• Resolved miendo

    (@miendo)


    Hello,

    I have a page with the following shortcode: [events_list category=”16″]
    That works perfectly, events are displayed according to the selected category ID.

    Now I need to add an additional filter, to list all the events of that category in a specific location.

    So I add a location ID like this: [events_list category=”16″ location=”1198″]
    But then the event list is empty.

    Of course I’ve checked that the events are correctly assigned to the location with the corresponding ID.

    What am I doing wrong?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Ehm… Do you really have 1198 locations? You need to enter the Location ID, not its Post ID. ??

    TreeTrail

    (@aprilschmitt27)

    Hello Miendo,

    Be sure that you’re using all of the necessary parts, like this:

    [events_list category=”48″ location=”16″ scope=”all”]
    #_EVENTNAME
    [/events_list]

    But I think that Patrick identified your problem: that you may be using the PAGE ID, rather than the LOCATION ID. I don’t know how to find the LOCATION ID from within EventsManager or WordPress. But I go to my host’s cPanel and use phpMyAdmin …to look at the “em_locations” table.

    ~April

    Hi April,

    It’s very easy to get the Location ID. ??
    Events – > Locations. If the first column is not the ID, click the “Screen Options” in the upper right corder and select the ID checkbox.

    Also, you do not need to use all arguments at all. If not set in the shortcode, the defaults are being used as defined in the Events > Settings > Event List/Archives > Default event list options.

    You only need to specify args in the shortcode if you want to overwrite those defaults ??

    Thread Starter miendo

    (@miendo)

    That was it! Since I wasn’t seeing the location ID, I was using the post ID… DUH!
    I feel a bit dumb for not checking the screen options ??
    Everything’s fine now, thank you all!

    TreeTrail

    (@aprilschmitt27)

    Hi Patrick,

    Again you have taught us extremely valuable lessons. Thank you very much!

    ~April

    TreeTrail

    (@aprilschmitt27)

    Obviously, you’re not the only one who didn’t notice that there were screen options on this page.

    Thread Starter miendo

    (@miendo)

    Yep, it’s not really obvious ??
    I don’t know if there’s a way for the developer to display the ID column by default, but it would be a good idea…

    Glad to help out, guys ??
    I think there is a filter you can use to change the defaults. I’ll check.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Events_list shortcode: problem with location ID’ is closed to new replies.