Shortcode – Display Single Category

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

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

Open Support Ticket
  • Author
    Posts
  • #484737

    phennessy
    Free User
    Post count: 3

    I am interested in displaying a single Place Category on a published page but cannot find the right shortcode. Any help would be appreciated.

    WP 5.1.1
    GD 2.0.0.57

    #484749

    Kor
    Moderator
    Post count: 16516

    Hi phennessy,

    Thanks for our post. Well, if you just want to display a single Place category, just hyperlink it using this method https://www.w3schools.com/tags/att_a_href.asp . I hope it helps.

    #484756

    phennessy
    Free User
    Post count: 3

    Hi Kor,

    Thanks for the quick reply. That doesn’t do the trick, but maybe I’m not explaining myself.

    I build categories (bars, restaurants, etc.). I build a page called ‘bars’. I would like to insert the listings for the bar category only on that particular page.

    The reason I’d like to do it this way is because of design considerations. I’m using a visual page builder on the site. So, the easiest thing to do would be using a shortcode to populate the content of each category.

    I hope that makes sense.

    -P-

    #484780

    Alex Rollin
    Moderator
    Post count: 27815

    You can use the shortcode builder to create a GD Listings element that is limited to the category of those listings.

    https://wpgeodirectory.com/docs-v2/geodirectory/design-elements/#gd_listings

    #484785

    phennessy
    Free User
    Post count: 3

    Thanks so much, Alex. We’re getting closer. The documentation doesn’t make it clear how to filter Places Categories. Is there a tag I need to add to this?

    [gd_listings post_type=”gd_place” sort_by=”az” title_tag=”h3″ layout=”gridview_onehalf” post_limit=”50″ add_location_filter=”1″ view_all_link=”1″ bottom_pagination=”1″]

    #484788

    Alex Rollin
    Moderator
    Post count: 27815
    #484791

    phennessy
    Free User
    Post count: 3

    Excellent! Thank you so much, Alex. Wasn’t super clear at first. Works perfectly.

    #484801

    Alex Rollin
    Moderator
    Post count: 27815

    Welcome! 🙂

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