Supreme Directory Search Order

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

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

Open Support Ticket
  • Author
    Posts
  • #444871

    Sam Sajid
    Expired Member
    Post count: 36

    Hey hope everyone is having a great Friday. I’ve been trying to figure out how to sort my results with featured first followed by other listings under the category selected. I was looking at some previous post that said to include this into a php file. I’m trying to figure out exactly where to put this code in the file because I’m not getting this to work. I would like to sort by featured first under the category. Also is there a way to have my categories set up in a check box type format to choose from for my search?

    add_action(‘geodir_before_listing’,’_my_listings_top’);
    function _my_listings_top(){

    global $wp_query;
    $current_term = $wp_query->get_queried_object();
    $cat_id = isset($current_term->term_id) ? $current_term->term_id :”;
    $post_type = geodir_get_current_posttype() ? geodir_get_current_posttype() : ‘gd_place’;

    echo “<h3>Featured listings</h3>”;
    echo do_shortcode(‘[gd_listings post_type=”‘.$post_type.'” layout=5 category=”‘.$cat_id.'” post_number=”4″ list_sort=”high_review” show_featured_only=1 ]’);
    }

    #444903

    Guust
    Moderator
    Post count: 29970

    To sort by featured first on your Listings pages:
    GD > Place Settings > Sorting Options tab > Add Featured to the Sorting options on the right, and set to default.

    Thanks

    #444908

    Sam Sajid
    Expired Member
    Post count: 36

    For some reason the featured is not at the beginning of the list. Maybe I’m doing something wrong. I’ve got the featured listing to show up on the page though. My website is http://www.fitbyzip.com and zip code is 68516. Maybe it’ll help if we’re looking at the same thing. I want the featured listings at the beginning regardless of distance, but within my search radius criteria. Is this possible?

    #444914

    Guust
    Moderator
    Post count: 29970

    I am guessing you are not talking about the Listings/Category page but the Search page.
    On Search pages, results are ordered by relevancy.

    You can see how it works on Listings pages: https://www.fitbyzip.com/places/fitness-center/

    Thanks

    #444941

    Sam Sajid
    Expired Member
    Post count: 36

    Okay I think I understand what you’re saying. Thank you! One quick followup question, can I have the popular categories show more than 5 on my home page, maybe in the next row? I have about 10 categories so that would be perfect. Thank you so much!!!

    #444943

    Sam Sajid
    Expired Member
    Post count: 36

    -If this is possible, along with count number of that category.

    #444969

    Guust
    Moderator
    Post count: 29970

    The Popular Categories widget is ordered by the number of listings in the categories.
    To change to show 10 categories, have a look at https://wpgeodirectory.com/docs/faqs/how-do-i-remove-the-popular-categories-section-from-the-home-page/
    Instead of removing the shortcode, just change 5 to 10.

    Thanks

    #444979

    Sam Sajid
    Expired Member
    Post count: 36

    Great thank you for all your help!!

    #444982

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

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

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

Open Support Ticket