SDAC Blog

Check out our blog for WordPress updates, WordPress plugin reviews, and general web development hints.

hr
hr

I have been working with a client recently that was using the My Page Order plugin for the WordPress CMS I set up. They had several "draft" pages they used for templates and did not want them to show up in the My Page Order Admin interface. After looking at the SQL code, I added in a piece that would only show published (live) pages.
To make the same change in your code, open up the plugin file (mypageorder.php), go to line 47 and change the following line:

PHP:
$results=$wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = $parentID and post_type = 'page' ORDER BY menu_order ASC");

to:

PHP:
$results=$wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = $parentID and post_type = 'page' and post_status='publish' ORDER BY menu_order ASC");

Now, only the pages you really want to order will appear in the menu.

hr

Comments/Pingbacks/Trackbacks

Add a Comment or trackback from your own site.

3 Responses

  1. look

    the plugin I like in this case (to do a little more…) is the “Navigation tool for WordPress” where you can not only manage pages but also categories and more.
    http://wordpress.org/extend/plugins/wordpress-navigation-list-plugin-navt/

  2. jzelazny

    The plugin looks very interesting - I will definitely give it a shot. Thanks!

  3. 42567a5c8dac

    42567a5c8dac…

    42567a5c8dacc18f9a4d…

Leave a Reply

separate