postMash - custom post order
reopening autodraft issue (2 posts)

  1. zandercent
    Posted 4 years ago #

    Hi re-opening this as the fix in the previous post on this topic didn;t work for me.

    Every time I use postmash a new post called Auto draft is created for every draft post that exists.

    Any ideas anyone?


  2. dsohigian
    Posted 3 years ago #

    I was able to get rid of the autodrafts by changing one line of code in the plugin. No guarantee on this, but it has worked for me so far:

    The line of code is:

    $pageposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'post' ORDER BY menu_order");

    Change it to:

    $pageposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'post' AND post_status <> 'auto-draft' ORDER BY menu_order");

    This just eliminates the auto drafts from showing up in the list. You can change this code in the WordPress UI (if you are an admin) by going to the Plugins>Edit menu item (and then select Postmash from the drop-down on the right). The code is about 50 lines down.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • postMash - custom post order
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic