Support

Home Forums Event Espresso Premium Custom Template Display – don't display certain categories

Custom Template Display – don't display certain categories

Posted: July 30, 2014 at 8:38 am

Viewing 6 reply threads


Amy Bridge

July 30, 2014 at 8:38 am

Hi All,

We have a few private events which we don’t want displayed on our site. All works fine except with the Custom Template Display addon. Can anyone help me out with what I would need to change so that only events in a certain category are displayed on this page.


Lorenzo Orlando Caum

  • Support Staff

July 30, 2014 at 5:42 pm

There is a shortcode to show events from a certain category:

https://eventespresso.com/wiki/shortcodes-template-variables/#event-list

[EVENT_LIST category_identifier=your_category_identifier]

[EVENT_LIST event_category_id=your_category_identifier]

Be sure to change your_category_indentifier to your actual value. Its usually an alphanumeric number.


Lorenzo


Sidney Harrell

July 30, 2014 at 6:19 pm


You’ll need to change the 1 in the code to the id of the category you want to display. Not the long category identifier, but the integer in the first column of the category table.


Amy Bridge

July 31, 2014 at 12:15 am

Hi Lorenzo,

Thanks for your reply, but I am talking specifically about the custom template addon.


Amy Bridge

July 31, 2014 at 12:19 am

Hi Sidney,

Thanks for your reply. Do I add the code you provided above teh following:

		if ($event_status == 'NOT_ACTIVE') { 
			$live_button = __('Closed', 'event_espresso');
			$cart_link = '';
		}

I tried that and when I reload the page, I am presented with empty data in the rows and the category selector below. I am sure i am doing something wrong.


Amy Bridge

July 31, 2014 at 12:21 am

Am I meant to edit the code you provided to include the categories I want to exclude?


Lorenzo Orlando Caum

  • Support Staff

July 31, 2014 at 1:47 am

That sounds possible as well:

https://eventespresso.com/wiki/custom-template-addon/#cel_how_work

Try this shortcode:

[EVENT_CUSTOM_VIEW event_category_id=”123″]

Change 123 to the category id that you are trying to show events for. This will be a number.


Lorenzo

Viewing 6 reply threads

The support post ‘Custom Template Display – don't display certain categories’ 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