How can CodeIgniter and WordPress be integrated such that the look and feel/template of the WordPress blog is carried over to the CodeIgniter-created pages?
When I included the file wp-blog-header.php in Codeigniter's index.php page, I got a problem that site_url() is defined in both codeigniter's URL helper and WordPress. I solved this using the following code:
require('blog/wp-blog-header.php');
add_filter('site_url', 'ci_site_url', 1);
function ci_site_url() {
include(BASEPATH.'application/config/config.php');
return $config['base_url'];
}
header("HTTP/1.0 200 OK");
Last line needs to be added as WordPress file was adding a HTTP response header 'HTTP/1.0 404 Page not found' to the header.
Now its fine to use WordPress functions to call in CodeIgntier.