• Resolved tjhole

    (@tjhole)


    This plugin is fantastic (combing Reorder by Term / Reorder Posts / Reorder Terms is really good)

    However, I am running into an issue on WP Version 4.9.8 with Reorder by Term Version 1.2.2 .

    — Steps to reproduce.

    I have created a custom taxonomy called ‘Genre’.

    I generate Post Term Data.

    I go to CPT > Reorder > Reorder by Term > Select Genre > Select Term > Drag items to order I want.

    This works perfectly. Front-end is updated. I am using a pre_get_posts hook and the following to order the archive page.

    if(is_tax( ‘genre’ ) && !is_admin()) {
    $post_type = get_queried_object();
    $slug = $post_type->slug;
    $key = ‘_reorder_term_genre_’.$slug;
    // order stuff
    $query->set( ‘posts_per_page’, 99 );
    $query->set( ‘post_type’, ‘work’ );
    $query->set( ‘order’, ‘ASC’ );
    $query->set( ‘post_status’, ‘publish’ );
    $query->set( ‘orderby’, ‘meta_value_num title’ );
    $query->set( ‘meta_key’, $key );
    }

    However, reloading the ‘CPT > Reorder > Reorder by Term > Select Genre’ page returns the orginal order. There are no other hooks affecting the order for the backend of the site?

    • This topic was modified 6 years, 1 month ago by tjhole.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ronald Huereca

    (@ronalfy)

    I suggest filling out this form and I can help you troubeshoot any custom code: https://mediaron.com/hire-us/

    Thread Starter tjhole

    (@tjhole)

    Just to follow on from this.

    I really couldn’t wrap my head around this. I installed a query debugger to find out what was going on when this was queried in the backend of WP. Whatever I did to try to fix it failed. I tried to add a ‘pre_get_posts’ action against the backend to force the order by meta etc. Looked at how the plugin was calling it etc. All looked fine. All should have worked.

    … turns out I didn’t remove ‘Intuitive Custom Post Order’ which forces $wp_query->set( ‘orderby’, ‘menu_order’ );

    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reorder by Term – Not displaying correct Term Orber in Backend’ is closed to new replies.