WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] List of Location IDs (10 posts)

  1. PokeAndHopeBlogger
    Member
    Posted 1 year ago #

    Hi

    I'd like to see a list of location IDs, where can I find these? I want to use it to insert a shortcode into a page for "events at this location", but to do that I need the location ID.

    Cheers

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

  3. PokeAndHopeBlogger
    Member
    Posted 1 year ago #

    Hi, all that does is gives me a list of locations, not the IDs. I am using a shortcode of, for example:

    [events_list limit="3" location="3"]

    This gives me the next 3 events at location ID 3.

    By doing that, for every number from 1-9999 I could find out which ID numbers match the locations....
    locations_list just gives me a list of locations, by name, linking through to their individual pages. I want to have, say, a post/page that says:

    The events at The Bus Stop are:

    [events_list limit="3" location="3"]

    And to know that the location ID of "The Bus Stop" is number 3.

    Or am I doing something fundamentally wrong?

  4. philipjohn
    Member
    Posted 1 year ago #

    Hiya,

    Do find the IDs of the locations, simply go to Events > Locations in your dashboard, click to edit the location you want an ID for. Look in the address bar and you will see an ID number.

    Cheers,
    Phil

  5. PokeAndHopeBlogger
    Member
    Posted 1 year ago #

    I went to Events, Locations and clicked to Edit.

    The address bar shows:

    ..wp-admin/post.php?post=24200&action=edit&message=1

    So what is the ID? 24200?

    At the moment I have one location showing its events, using the code [events_list limit="3" location="20"] as the location ID is 20, which I found by copying/pasting in every location ID to see the events it showed and so be able to work out the location ID.

    Having just gone to Events, Locations, Edit for that location (ID=20), the address bar shows me:
    ...wp-admin/post.php?post=11157&action=edit

    I will edit my page, which has code of [events_list location="20"] and change it to be [events_list location="11157"] to see what happens.

    There are events at the location and when I have put location="20" into the shortcode it shows them. When I changed that to location="11157" I got a message that there are no events at the location.

  6. PokeAndHopeBlogger
    Member
    Posted 1 year ago #

    When I first installed the plugin, creating a new location didn't auto-generate its own page. It simply existed out of sight.

    So, when I started my site, I first created pages for my locations amd wrote a page all about the place. I then used the shortcode, placed in the page I'd created, to show the events at that location.

    Then every time there was an event at that location I'd go in and Add Event, choose the location and it'd appear in the list.

    I am not running events, or taking bookings - it's really a simple events calendar for a town.

    I used to be able to see the ID of the locations, then the plugin changed.

  7. caimin_nwl
    NetWebLogic Support
    Posted 1 year ago #

    As far I remember, there haven't been any changes made to the plugin recently that involve the way locations work.

    You can find the location IDs by looking directly in the database using something like phyMyAdmin. The database table you need to look at is called wp_em_locations.

  8. PokeAndHopeBlogger
    Member
    Posted 1 year ago #

    I never look at the database.... I never used to have to. I used to go to Locations and there was a column showing there with the ID in it.

    I originally had a few pages set up and found the original IDs (in 2010/2011) in that way. Last week I found I couldn't see the ID any more in a column in the list of locations in the admin panel, so simply used the code

    Location 1: [events_list limit="1" location="1"]
    Location 2: [events_list limit="1" location="2"]

    And did that for the first 20 manually, then did a copy/paste of 20-29 into Notepad and used Replace All to convert 20 to 30, 21 to 31 etc .... then copied/pasted those results over. Then did the same to replace 30-39 .... and then 40-49 ... and when I got to location 79 and had still only found about 6 location IDs with events, I stopped doing that .... and today I thought I'd ask the question :)

    As each location ID was showing events, I knew where they were based on what the event was, so then I went back in and overtyped "Location 1" with its actual name, so I could see them to be able to use them on the relevant pages/posts. It works, but is very long-winded!

  9. PokeAndHopeBlogger
    Member
    Posted 1 year ago #

    You marked it as resolved.... so "look in the database" is the only answer is it?

    Just checking.... bit of a nuisance, it used to be listed in a column :(

  10. angelo
    NetWebLogic Support
    Posted 1 year ago #

    sorry for the confusions, but when you say "List of Location IDs" and using shortcode locations_list you can try something like

    [locations_list]
    #_LOCATIONID
    [/locations_list]
    or can you share some formats on how you wanted it to be displayed ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic