Is it possible to do an AND listing via shortcode?

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

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

Open Support Ticket
  • Author
    Posts
  • #166777

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Hi,

    I’d like to provide a number of listings, grouped by either a tag or a category. At the moment, I can’t see a way to do this. More detail:

    I have a number of Places in my database. All Places have a descriptive Category applied (a class of sorts, like bistro, café, licenced dining, etc.), as well as a rough geographical Category (very loosely-defined clusters of regional communities, specifically not regions or neighbourhoods, e.g. Springfield Area, Smallville Region).

    I cannot see a way, using what’s listed on https://wpgeodirectory.com/docs/core-shortcodes/, to display a list of Places that satisfy 2 Categories, e.g. “Bistros in the Smallville Region”. I’ve tried using tags, too, in place of a second Category, but the only mention of Tags on the shortcodes page relates to Related Listings, which doesn’t seem relevant.

    Any suggestions?

    #167067

    Paolo
    Site Admin
    Post count: 31206

    With the GD Listings shortcode you can add as many category ids as you want: https://wpgeodirectory.com/docs/core-shortcodes/#listings

    You just need to separate them with a comma.

    Let me know if I misunderstood your question.

    Thanks

    #167987

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Hi, Paolo,

    Thanks for your reply.

    Sorry; I think I explained poorly.

    What this is returning is everything from 2 Categories.

    I only want the overlap of things that are in *both* Categories.

    I would think that “everything that’s in Category A if it’s also listed in Category (or Tag) B” would be closer to what I need.

    Is there no way to use Tags? (If not, I am confused as to why they are they there. Are they included as a generic WordPress taxonomy that’s not specifically addressed by the GeoDirectory plug-in?)

    #168289

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    no that is not possible. Tags isn’t a parameter for the shortcodes because nobody ever requested it.

    If you request here: https://wpgeodirectory.com/requests/ and many other members vote for it, we will difinitely consider adding it.

    Thanks

    #168292

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    Thanks for the reply.

    Promises of “maybe, later” are of no use to me today when I have a site to finish.

    Setting aside tags, then, is there really no way to do something this basic using GeoDirectory?

    #168293

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I’m sorry to disappoint you.

    Personally I’ve never seen a shortcode with such parameters.

    Thanks

    #168969

    CHRISTOPHER MACKAY
    Buyer
    Post count: 37

    I can’t believe that there isn’t a shortcode that can do boolean intersection. This is what databases are *for*.

    #169117

    Paolo
    Site Admin
    Post count: 31206

    I didn’t say it is not possible, it is not available because in 2 years nobody ever requested something similar, nor we saw the necessity.

    As I said, I’ve never seen a plugin offering shortcodes with such parameters, so it must be something not many people really need.

    Thanks

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