DigitalEnigma Posted June 30, 2011 Share Posted June 30, 2011 Hi, I've been trying to show the last 3 posts from our blog in the footer of our WHMCS pages however do not seem to be having much luck. I've got the code from the WordPress codex in an external include file as this is used on our non-WHMCS pages too. If I try to include this file with the smart {include_php file=""} it seems to break thr WHMCS layout, outputs an error (below) and causes the page URL to have /wp-admin/install.php appended to the end of it. Fatal error: Call to a member function register_handler() on a non-object in /home/********/public_html/blog/wp-includes/media.php on line 1308 Has anyone been able to get WordPress posts to show within their smarty templates? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted June 30, 2011 Share Posted June 30, 2011 Theres several jquery/javascript RSS parsers out there. I'd suggest starting there. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted June 30, 2011 Share Posted June 30, 2011 or just a "select" on the posts table in WP and format it how you want ... 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted July 1, 2011 Share Posted July 1, 2011 I think he has the method of getting the posts, he is just having trouble displaying on the whmcs pages. Maybe try this: {php} include('/path/file.php'); {/php} Or you could take the content of file.php and put it all inside {php} {/php} 0 Quote Link to comment Share on other sites More sharing options...
DigitalEnigma Posted July 1, 2011 Author Share Posted July 1, 2011 Hi, Thanks for the replies, I have the code to show the posts in the include file it just does not play nicely with WHMCS and the Smarty Templates. @Gears I;ve tried both the include methog you posted above and pasting the PHP code into the page between the {php}{/php} but still generates the same error as using the smarty php include method. 0 Quote Link to comment Share on other sites More sharing options...
flyride Posted July 20, 2011 Share Posted July 20, 2011 Did you ever get this to work? I'm trying to do the same thing with the same result... thanks in advance! Hi, Thanks for the replies, I have the code to show the posts in the include file it just does not play nicely with WHMCS and the Smarty Templates. @Gears I;ve tried both the include methog you posted above and pasting the PHP code into the page between the {php}{/php} but still generates the same error as using the smarty php include method. 0 Quote Link to comment Share on other sites More sharing options...
jeremyhaber Posted July 20, 2011 Share Posted July 20, 2011 If you wait about another week or so we will have a solution available on WHMCSAddon.com that will be able to display wordpress posts throughout WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.