WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Redeye Adaya
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/simple-page-ordering/

  2. eric55on
    Member
    Posted 1 year 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 1 year 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 Sogge Heggen
    Member
    Posted 1 year 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
    Member
    Posted 10 months 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

About this Topic

Tags