I can’t preview post’s change once they are published

The preview function works fine when posts are just draft. The url looks like this : http://exemple.domain.com/blog/?p=12&preview=true Then when I pubish my posts, let’s say I want to change something and preview it, the url looks like this : http://exemple.domain.com/blog/my-article-title/?preview=true&preview_id=12&preview_nonce=514e88946a&post_format=standard The problem is it does reflect any changes … I use WordPress 3.9.2 running Twenty … Read more

WordPress API – Get Drafts

I want to check if a post already exists. This includes to check if the post exists as draft as well. But I struggle a little bit with the wordpress API v2. http://v2.wp-api.org/reference/posts/ Under List Posts -> status they say Limit result set to posts assigned a specific status. Default: publish I tried to assign … Read more

Exclude Private, Draft pages from Primary Nav when using custom menu

I’m looking for ways to prevent “private” and “draft” pages from appearing (to non-logged-in admins) in a site’s Primary Navigation menu which is based on a custom menu – other than manually removing such pages from the WP custom menu and then dragging them back when they are published, that is. FWIW, I’m surprised the … Read more

wp_delete_auto_drafts() deletes links in menus

Since yesterday the wp_scheduled_auto_draft_delete cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta with meta_key = ‘_menu_item_object’ and meta_value=”page” get deleted in the process. By tracing back the DELETE query I found out that the menu entries are deleted by a function called _wp_delete_post_menu_item. I got the following … Read more