• Resolved Alex4842

    (@alex4842)


    Hello and thank you for your amazing plugin! The plugin works amazing on post categories but it doesn’t show me the results alphabetically. Can you please help me and tell me why?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Alex4842

    (@alex4842)

    I managed to make them adding this code:

    function search_filter($query) {
    if ( !is_admin() && $query->is_main_query() ) {
    if ($query->is_search) {
    $query->set(‘orderby’, ‘title’);
    $query->set( ‘order’, ‘ASC’ );
    }
    }
    }

    add_action(‘pre_get_posts’,’search_filter’);

    Plugin Author Sumit Singh

    (@5um17)

    Hi,

    Thank you for posting the solution. I will consider adding a new option for order of posts in next version.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘search results aren’t alphabetically’ is closed to new replies.