Search Results in Ascending (Alphabetical Order)

This topic contains 2 replies, has 2 voices, and was last updated by  Guust 6 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #447404

    Phil Autrey
    Full Member
    Post count: 21

    The results on search and category results do not appear to be coming back in alphabetical order and I am wondering what I need to do about this.

    I have added the following snippet to code snippets but it does not seem to be working.

    add_filter(‘geodir_posts_order_by_sort’,’_my_custom_order_by’,10,3);
    function _my_custom_order_by($orderby, $sort_by, $table){
    global $wpdb;

    if($sort_by==’is_featured_asc’){
    $orderby .= ” $wpdb->posts.post_title ASC, “;
    }
    return $orderby;
    }

    Do you have any ideas? Thanks!

    #447405

    Phil Autrey
    Full Member
    Post count: 21
    This reply has been marked as private.
    #447411

    Guust
    Moderator
    Post count: 29970

    To order Listings pages alphabetically, set your default sorting order by title at GD > Place Settings > Order tab.

    On Search pages, results are always ordered for relevance to the visitor’s query.

    Thanks

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount