I have an wordpress setup into /blog folder under my site directory.
I have a .inc file for fetching the latest blog posts from wordpress to show into my site’s homepage.
But when i include that .inc file in my site’s homepage via php include, i get redirected to login page.
After a bit of debugging i found this query into the function is_blog_installed()
"SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'"
which simply gives me this when i echo this –
SELECT option_value FROM options WHERE option_name = 'siteurl'
thats is the options table name is “options”, not “wp_options”, which means the table_prefix set in wp-config.php file is not being used.
I don’t know why this is happening. So, please help!
Thanks,
Anjan
Finally i found that it is because the database connectivity issue between my site and that of the wordpress. I resolved this by capturing the wordpress content using output buffering before any of my sites database connection is being made and using the captured wordpress html markup later when needed.