Welcome Guest, Not a member yet? Register   Sign In
Problems with CodeIgniter and its integration with Wordpress[Solved]
#1

[eluser]Unknown[/eluser]
Hello My name is Javier, I am a PHP developer, and I speak Spanish (Google translation).

I have the following problem.

I have installed in CodeIgniter (example) and I need Wordpress http://www.mywebsite.com at the following url http://www.mywebsite.com/news/

Then find ways to integrate and follow this guide:
http://opinionatedcoder.wordpress.com/20...llo-world/

And since apparently it works, the problem is that none of the functions of wordpress works well with the exception of the one that shows all posts (the next):

Code:
if (have_posts()) :
         while (have_posts()) : the_post();
            the_title();
         endwhile;
endif;

That if it works, the others also work and if there are (already checked), but loses all the information, for example if the list of categories ask me that is empty, which is not logically true.

According saw another guide integration (http://philpalmieri.com/2009/06/codeigni...-together/) is that the variable $WP_Query CodeIgniter destroyed , but it is rare that neither using global $WP_Query work.

Any suggestions.

I leave the functions do not work (as I said before only the first code works as usual).

Quote:$myposts = get_posts('numberposts=3&category=7');

wp_list_categories();

Thank you very much for all your help.

[UPDATE]Solved:

Had already been settled:

The problem was that Wordpress and CodeIgniter were in different databases and therefore could not return the result as well and everything works without any problems only had to move my wordpress tables to the same database Codeigniter and ready.

Thanks to all
#2

[eluser]skunkbad[/eluser]
I think you should set up your .htaccess to route all requests to the blog at /news/ directly, instead of passing the request to index.php. Either that or set-up a sub-domain for the blog.




Theme © iAndrew 2016 - Forum software by © MyBB