Posted: May 17, 2019 at 9:53 am
|
Hey Team – Great support thank you. When I use a Event Category Menu item it will list the Events of that Category Perfectly. However if I add People using the People Add on as Trainers, it lists all the trainers for that event and their bios. Is there any way to suppress or HIDE the Traininers on the Category View, and just show them on the Event Detail Page, or Have the People show inside the Details View? |
Hi, Yes there is a way to remove the trainers when it’s a category view. You can add the following code snippet to your site: https://gist.github.com/joshfeck/45c94379ac1443b0b0702b7dd1c092c3 You can add the above to a functions plugin or, if available, into your WordPress child theme’s functions.php file. |
|
|
I added the Code, and the Trainer still shows. To be clear this view is the Menu Item “Event Category” not an actual page or archive page. Is there some code change needed for the Menu View? |
It should work regardless of the page/post type. Was the code added to a plugin, and if so is the plugin activated? |
|
|
This reply has been marked as private. |
The Plugin “Snippets” is probably loading the code too late in the request. The code needs to be loaded before the If you add the same code to either the theme’s functions.php file or into a plugin file (similar to the plugin outlined in this guide) then the code will load early enough to do its thing. |
|
|
Thanks Josh, I tried putting the Code at the Bottom of the functions.php file as well as the top, and it did not seem to make a difference. |
That’s really strange. I added the same code to my site’s theme’s functions.php file, and the People listing disappeared from the event category list. You could try adding the code to an activated site-specific code plugin. |
|
One reason why the code I shared with you wouldn’t work, is if the Use Custom Display Order? option is set to Yes. That’s a setting in Event Espresso > Events > Templates, under the heading “Event List Pages”. If that is set to Yes, then this is the code to use to remove the people listing on event category pages:
|
|
|
Hi Josh – This worked Perfectly. Thank you I am all set. |
The support post ‘Hide People/Collapse in Event Category List’ 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.