WordPress.org

Ready to get started?Download WordPress

Forums

Metronet Reorder Posts
[resolved] New reorder page in admin but no reorder on live site (9 posts)

  1. marcelvanm
    Member
    Posted 1 year ago #

    Installed the plugin and seeing the extra Reorder page in the admin. Reordering the posts there doesn't have any effect though.

    Can't seem to find anything wrong and don't have any idea to fix it other than I think the plugin needs to overrule the datestamp of each post (or something) to work.

    http://wordpress.org/extend/plugins/metronet-reorder-posts/

  2. mhamann
    Member
    Posted 1 year ago #

    I have the same issue. I believe it's because the query being run against the posts needs to use 'menu_order' as the 'order' parameter. So, modifying the query in just that one aspect (via a template file) should solve the problem.

    I'm still trying to figure out how to do that without using query_posts() and rewriting the entire query. :-/

  3. mhamann
    Member
    Posted 1 year ago #

    Okay, figured it out.

    Just before the beginning of the main loop

    <?php if (have_posts()): ?>

    add the following lines:

    $wp_query->set('orderby', 'menu_order');
    $wp_query->set('order', 'DESC');
    $wp_query->get_posts();

    You can change 'DESC' to 'ASC' if you want to reverse the order.

    That should solve your issue. :)

  4. Ryan Hellyer
    Member
    Plugin Author

    Posted 1 year ago #

    Hi. I'm the developer of the plugin.

    What you are experiencing is not a bug in the plugin, that's just how it works. I guess I need to document that better to avoid confusion.

    The plugin intended for changing the post order, not the post date.

    You would typically use a plugin like this in conjunction with a custom post-type. The core code of this was originally built to handle the reordering of e-commerce products within a custom e-commerce plugin. I abstracted that out into the plugin you downloaded so that it could be reused on multiple sites. It was never designed with reordering by date in mind, although it looks like mhamann has kindly found a solution to achieve that for anyone who feels that would be useful.

  5. johnnylive
    Member
    Posted 1 year ago #

    Hey Mhamann,

    Would you please help me implement your solution to my site? I would like to have the order of my site descend from most current to oldest. Here's is my site:

    http://www.tania-coronado.com/

    Im using Reflex wordpress theme.

    thanks
    -Johnny

  6. kensnook
    Member
    Posted 1 year ago #

    Ryan,
    I am trying to use this plugin to simply reorder single posts by the order that I put them in using your drag and drop listing of my single posts...NOT by date. This doesn't work. Can you please explain in detail what needs to be changed to make this work. I do not write PHP so I need to know which file to modify and what to change. I tried adding mhamann's code...
    $wp_query->set('orderby', 'menu_order');
    $wp_query->set('order', 'DESC');
    $wp_query->get_posts();

    this didn't do anything. By the description of the plugin I would figure it would just reorder by the listing from top to bottom where I place them.

  7. Ryan Hellyer
    Member
    Plugin Author

    Posted 1 year ago #

    Unfortunately you need some knowledge of PHP to implement this. It looks like you have it set to "menu_order", which is what you need.

  8. kensnook
    Member
    Posted 1 year ago #

    Your plugin already does this...
    //Output non hierarchical posts
    $post_query = new WP_Query(
    array(
    'post_type' => $this->post_type,
    'posts_per_page' => -1,
    'orderby' => 'menu_order', /*this line sets to "menu_order"*/
    'order' => $this->order,
    'post_status' => $this->post_status,
    )
    Please tell me where else this must be set (what .php file in the build?)

  9. Ryan Hellyer
    Member
    Plugin Author

    Posted 1 year ago #

    I don't know what you are trying to achieve, so I can't help sorry. There are an infinite number of ways in which you could use this plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic