I am writing a custom database page outside wordpress, but would like to import my wordpress theme and also pull in a post for this page.
First, I include this to pull in the wordpress theme and other functions:
require($_SERVER['DOCUMENT_ROOT'] . '/wp-blog-header.php');
now, if I include a call a wordpress function here, something like get_post($my_id); it works great.
But, the same function doesn't return results if I insert it after this mysql call:
Which is a problem since I need it to be included after that call.
Any thoughts on why? Is there anything I can do to get a post after I connect to the other database? Closing the mysql connection doesn't change anything, unfortunately.
Thanks in advance