I have been creating wordpress pages/posts from outside of wordpress. In other words i’m just running a query to insert a row into wp_posts (with all the same fields filled in as wp-admin does for me). I also create a few post_meta rows (again same as wp-admin does). If I go into wordpress admin afterwords and try to edit the post, no problems. Looks fine and I can edit it just fine. Problem comes when I hit preview. I get a this article not found error (have_posts returns false). If I hit ‘Update’ on the page or post inside wordpress admin, all is good, the preview then works fine. Is there some caching going on I don’t know about? WP_CACHE is not defined in wp-config.php and I don’t have any plugins running. What am I doing wrong?
- The topic ‘Can't publish a post outside of wordpress’ is closed to new replies.