Simple Page Ordering
[resolved] Doesn't work with WP_Query (5 posts)

  1. Redeye Adaya
    Posted 3 years ago #

    There are many issues here regarding the use of WP_Query with this plugin but why does the author keep mum about it? Why don't you just tell them that this doesn't work with WP_Query?


  2. eric55on
    Posted 3 years ago #

    Just figured the thing out. There is even a video describing the drag and drop functionality BUT there isn't a single WP_query demo! After a week, I noticed in the backend the link for ordering posts/pages (Sort by Order). The link:

    <a href="/wordpress/wp-admin/edit.php?post_type=competence&orderby=menu_order+title" class="current">Sort by Order</a>

    You can see the query ordering:orderby=menu_order+title. So using this in a WP_query sorts the custom posts in the correct maner.

    My example:

    $new = new WP_Query(array( 'post_type' => 'competence', 'orderby' => 'menu_order', 'order' => 'asc', 'showposts' => '100' ));
        while ($new->have_posts()) : $new->the_post();

    You'r welcome :)

  3. Jake Goldman
    10up Engineer
    Plugin Author

    Posted 3 years ago #

    Yea, the plug-in intentionally doesn't change default front end or WP_Query behavior. You must specify menu_order if it's not a hierarchical post type that sorts in that order by default.

  4. Erlend
    Posted 3 years ago #

    Maybe you should look into how the near-identical plugin Post Types Order solves this by prompting the user to allow the plugin to change WP_Query behavior.

    I really wanted to use Simple Page Ordering because of its seamless interface, but the incompatibility with certain post types (in my case WooThemes' Portfolio) is unfortunately a deal-breaker for me and my purposes.

  5. marekmaurizio
    Posted 2 years ago #

    Whenever you choose one approach or the other, one line like:

    To order a custom query add the 'orderby' => 'menu_order', 'order' => 'asc' options

    takes 3 seconds to add to the docs.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Page Ordering
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic