Ok, so after reading the codex page on the ‘save_post’ hook, I spotted that they use a different way of dealing with revisions. So removing the if {...}
surrounding the wp_update_post( $posttitle )
and inserting the following code fixed my problem:
if ( $post = wp_is_post_revision( $post ) )
$post = $post;
Related Posts:
- How to display value of custom fields in page
- Custom post type single-{custom}.php not working
- Mini-Site Strategy
- Custom Post Type Permalink Page Not Found
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- Custom Post Type Archive URL takes over page URL
- Where to put archive-{post-type}.php
- How to set a custom post type post as static front page?
- Managing event dates vs published dates in admin custom post type
- Custom post type archive sorted and grouped by date in post meta field
- Assigning Multiple Layout Designs with Custom Pages in WordPress?
- How to retrieve custom field types for all posts in WordPress/PHP?
- Integrating Orbit slider into wordpress through custom post type
- Generate Shortcodes by Taxonomy
- Why is archive.php used for my page
- ACF simple text field value not showing
- Made Custom Post Types, but single.php not working
- Is it possible to place custom post type files inside a folder in theme directory?
- What’s the difference between same wp functions get_posts(); functions in different form?
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- Get term name and term parent into custom post type permalink
- Help need making decision. Ads rotating site on wordpress
- Return the latest post from a custom Taxonomy and Post Type
- Don’t know how to show custom taxonomies from a custom post_type
- JS innerhtml changing style when using AJAX
- How to change the post type a theme shows by default?
- Get unique superset of taxonomy terms from a list of custom posts in another hierarchical taxonomy
- Event Custom Post Type Title show by upcoming Event Dates
- How to have this permalink structure: post_type/postname/custom_inner_page
- Custom post types and category archive
- custom comments form for custom post type
- How to produce a sub-page-system in WordPress
- WebP Fallback for Inline Background Image in Style Attribute
- Warning: Invalid argument supplied for foreach() in post.php [closed]
- How can i link a custom post type thumbnail to intermediate size
- i cant see the max_num_pages of a custom wp query
- Archieve.php not loading for custom post type
- detect your custom post type in WordPress
- Specify a particular page to list all custom types
- WordPress app page not found error for posts with hyphen in permalink
- Where is the sticky post option?
- Create a comments template for custom post types
- WP_Query with custom post type ID
- Archive links for custom post types
- Include custom post type custom taxonomies in Categories widget
- Template Hierarchy for custom post type pages
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- Custom Post type content within a slider
- Methods for development wordpress themes [closed]
- Custom Post Type – after disable ‘Add New’, I can’t edit and delete post
- Searching post types
- Add admin script to several post types
- Why does my URL keep returning 404 error code?
- Custom Post Type – Main page for certain posts
- How to exclude categories from a sidebar with active widgets in it?
- How does one go about converting custom post type to post format?
- How to display magic field’s custom write panel in wordpress theme?
- Creating an option for writing a post without an author attribution for a group blog on WordPress
- WordPress giving me the index
- Custom post category name showing empty
- How to store the third party script with HTML code in the wordpress custom input field?
- Getting Same Description in All the Custom Taxonomy Posts
- Get next and prev item from custom WP_Query and Custom Post Type
- Post type to appear on every page on site
- Page not found on custom post type page for projects
- Error 404 change permalink term custom term taxonomy
- How to display custom field in product description?
- Post template not applying on theme (potentially rendering as Page template)
- I have a random letter appearing before my content. Where to start looking for the cause?
- Custom post type single page uses the right template in preview mode but shows a different template after being posted
- How to display only child category post in related posts in custom post type?
- Front End users account with lots of user Roles (not Woocommerce)
- Values show up in custom home page but not in custom post pages
- Permanent Custom Post Type
- Custom post type that lets users create a set of posts?
- Links Image in “Catalog” Page to Posts
- WordPress is giving a warning but my code is working fine
- wordpress query_posts with foundation 6 Accordion not working correctly
- Creating Slider in wordpress theme with custom post
- Help with Multi Level Category Archive Page
- Not Able to Get Custom Post Type in Single and Single-custom-post-type
- How to develop custom URL redirection
- Loop carousel slider in wordpress
- Using piklist meta box, strange behavior
- Custom taxonomy page template
- get_pages can’t load pages with custom post types
- Cant insert wrapper div into index.php
- erase post excerpt limitation [×]
- show custom taxonomies in hierarchy
- How can I detect a chosen Isotope layout option from within Javascript to generate appropriate layout?
- Add “post option” support parameter in custom post type using Hueman Theme?
- Not Able to Display Metabox Saved Checkbox and Selected option After Save/ Update
- Having some trouble properly displaying Custom Post Types in templates
- Displaying information from Custom Fields in template with Types?
- How to Create Custom Post Type with Multiple Color Options?
- How to manage wordpress knowledge base/wiki/posts collections
- Passing postid of Testimonial Custom Post in Shortcode Parameter
- Retrieve a post with its ACF repeater fields in wordpress
- WordPress search results grouped by post type
- Default WordPress Query for a Specific Custom Post Type URL