Hi
I'm developing a PHP function that should create a page in a specific blog. I've started from wp_insert_post and modify it to insert just pages.
Basically I make some insert in the following tables:
- wp_11_posts where a write page content, author, status = publish , permalink i need ....
- wp_11_postmeta where I insert post_id, _wp_page_template, default
- wp_11_categories where I insert post_id , 1 (category id)
In this way the page is created i can see it in the manage section of WP Consolle but i cannot view it using the permalink. I get 404 not found.
If, using the WP consolle i choose to edit the page and i save it without any modification than it works i can see it using the pemalink.
So there is some info missing , i need to store some more info somewhere.
I've tried to follow the consollo flow but it is difficult to understand page-new.php and page.php flow.
Any suggestions?
thanks
Paolo