Welcome Guest, Not a member yet? Register   Sign In
Displaying wordpress posts on CI home page
#1

[eluser]DrDave[/eluser]
I have a wordpress blog installed on a subdirectory of my ci installation. I have been trying to figure out how to display recent posts on the ci home page without completely integrating wordpress and ci.

I found this code which is supposed to make the wordpress API available for use:

Code:
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('./blog/wp-load.php');
query_posts('showposts=1');
?>

When I include that in my home view, I get a codeigniter 404 page when visiting "http://www.mysite.com". It seems as if it is trying to redirect to "http://www.mysite.com/wp-admin/install.php".

Does anyone have any idea what I'm missing?

Thanks in advance!
#2

[eluser]DrDave[/eluser]
I found the answer here: http://ellislab.com/forums/viewthread/126707/#635828

I swear I spent a couple hours searching before I posted, honest! I always seem to find the answer after I post.




Theme © iAndrew 2016 - Forum software by © MyBB