Sort by featured with gd_listings shortcde

This topic contains 4 replies, has 3 voices, and was last updated by  Alex Rollin 5 years, 3 months ago.

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #504248

    Aleks Szymanski
    Free User
    Post count: 23

    Is there a way to sort by featured listings using the “gd_listings” shortcode. This is what I have but it’s not working:

    [gd_listings post_type="gd_place" sort_by="featured" title_tag="h3" layout="4" post_limit="20" view_all_link="0" with_pagination="1" bottom_pagination="1" pagination_info="before" category="clubs"]

    It’s still ordering by date.

    #504256

    Alex Rollin
    Moderator
    Post count: 27815

    You can use the option to show only featured listings, but there isn’t an option to sort by featured. Show only featured with show_featured_only=”1″

    
    
    
    [gd_listings post_type="gd_place" sort_by="az" title_tag="h3" layout="1" post_limit="5" add_location_filter="1" show_featured_only="1" view_all_link="1" bottom_pagination="1"]
    
    #504364

    Aleks Szymanski
    Free User
    Post count: 23

    Thanks Alex. Is there some sort of filter/action I can add in functions.php to sort by featured first?

    #504404

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Aleks,

    You can find docs here about sorting; https://wpgeodirectory.com/docs-v2/design/gd-listings/

    TDLR; If you add a custom sort option under;
    CPT (places) > Settings > Sorting
    It will then appear in the sorting list, so you can add featured as a sorting option and then apply it after.

    Thanks,

    Stiofan

    #504407

    Alex Rollin
    Moderator
    Post count: 27815

    I just learned about this, myself!, added a doc for it here: https://wpgeodirectory.com/docs-v2/places/sorting/#featured-gd_listings

Viewing 5 posts - 1 through 5 (of 5 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