Forums Forums Search & Filter Pro Sorting results by a custom order

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #30675

    I have not been able to figure out how to manipulate the sort results without manipulating all loops.
    I have added this to my functions file:
    function env_sort_res() {

    if ( is_admin() ) return;

    if( is_main_query() ) {
    set_query_var(‘orderby’, ‘menu_order’ );
    set_query_var(‘order’, ‘ASC’ );
    }

    }
    add_action(‘pre_get_posts’, ‘env_sort_res’, 99 );

    what can I do to just target the loop on the results page?

    Ross Moderator
    #30676

    Why not use the built in ordering options in the Posts tab in the S&F edit screen?

    The next release actually adds a second sort option too.

    Thanks

    Anonymous
    #30677

    Because I couldn’t find that option…Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)