Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 🙂

    Plugin Author Jake Goldman

    (@jakemgold)

    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.

    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.

    Marek

    (@marekmaurizio)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Simple Page Ordering] Doesn't work with WP_Query’ is closed to new replies.