• Resolved chrispink

    (@chrispink)


    Another wonderful plugin Hijiri – simple and effective.

    I have a taxonomy-mytax.php and the post are not ordering on this.

    When I do a wp-query() to list them in the sidebar, all well and good, the order i make and see in the admin is reflected there so I know it’s working.

    Unfortunately it’s not working in the taxonomy archive

    Any thoughts?

    https://ww.wp.xz.cn/plugins/intuitive-custom-post-order/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chrispink

    (@chrispink)

    For anyone treading this way;

    Add this to functions.php

    add_action( 'pre_get_posts', 'my_change_sort_order');
        function my_change_sort_order($query){
            if(is_tax( 'my_tax' )) :
               //Set the order ASC or DESC
               $query->set( 'order', 'ASC' );
               //Set the orderby
               $query->set( 'orderby', 'menu_order' );
            endif;
        };

    The plugin is a way of manipulating menu_order

    Thanks a lot chrispink, i was just looking for solution and found this thread, very helpful 🙂

    I’ve created a pull request to address this issue and respect which post types are enabled when sorting taxonomy archives: https://github.com/hijiriworld/intuitive-custom-post-order/pull/9

    Thank you chrispink for sharing your code. It worked perfectly and saved from from pulling my hair out and/or switching to a different plugin!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Taxonomy archive post order’ is closed to new replies.