Support

Home Forums Event Espresso Premium Events per venue per city

Events per venue per city

Posted: March 3, 2021 at 2:00 pm

Viewing 1 reply thread


inholyland

March 3, 2021 at 2:00 pm

Hi

I want your recommendation

I made custom coding for events to show like this
https://engineeringforkids.ps/%D8%A7%D9%84%D8%A8%D8%B1%D8%A7%D9%85%D8%AC-%D8%A7%D9%84%D8%AD%D8%B6%D9%88%D8%B1%D9%8A%D8%A9-%D8%A7%D9%84%D9%87%D9%86%D8%AF%D8%B3%D8%A9-%D9%84%D9%84%D8%B5%D8%BA%D8%A7%D8%B1/

Courses grouped by Date ordered by Event time and events with same time show next to each other. I have max 2 events that can happen at same time

Now i want to show these events per CITY per VENUE
Meaning the above link will lead to page listing CITIES
when click on a CITY, VENUES in that CITY will be listed
when click on a VENUE, COURSES in that VENUE will appear in the form of above link

Can you suggest where to get CITY from?

In EVENT VENUES i see CATEGORIES, can i use the CATEGORY as a CITY
so when adding a new venue i choose to which category (city) it belongs

Or do you have another idea

please advice


Tony

  • Support Staff

March 4, 2021 at 4:56 pm

Hi there,

You ‘could’ use categories, but it’s not how I would do it.

You can pull all the cities you have venues in using something like this:

EEM_Venue::instance()->show_next_x_db_queries();
$venues = EEM_Venue::instance()->get_col(
	array(array(), 'group_by' => 'VNU_city'),
	'VNU_city'
);

$venues will be an array of cities for your venues, loop over those and output your list, although you may want to use get_all() to pull EE_Venue objects so you can use those for further values, then just loop event the EE_Venue objects to output city().

The model system makes this fairly easy to do, if you haven’t looked over it already I recommending you view the docs here:

https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System

Viewing 1 reply thread

The support post ‘Events per venue per city’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso