wp-blog-header.php on external page results in database error
-
Hi!
I’ve seen this basic question asked before, but never answered.
I need to call WordPress-generated content on an external, non-Wordpress site. I’ve read the Codex entry on this backwards and forwards, and have added
<?php require('/the/path/to/my/wp-blog-header.php'); ?>
to the header of the external page I want to embed WordPress content on.Unfortunately, this immediately generates the famous “Error Connecting to Database” page. The thing is, my wp-config file is fine: In fact, the WordPress site itself loads fine. The database error only happens on the external page. I suspect there is some conflict happening between WordPress and the system powering the external site (the external pages are generated by a proprietary system using Smarty, with its own database. I didn’t make it and have little control over it).
Any ideas about what would cause this? If I can’t work it out, I’m going to be stuck calling the WordPress content in an iframe, which is extremely suboptimal.
Thanks in advance!
- The topic ‘wp-blog-header.php on external page results in database error’ is closed to new replies.