Support

Home Forums Event Espresso Premium Does events shortcode allow hiding a category?

Does events shortcode allow hiding a category?

Posted: February 24, 2018 at 4:29 pm


pickwicksplum

February 24, 2018 at 4:29 pm

I’m currently rocking the shortcode:

[ESPRESSO_EVENTS show_expired=false limit=6 order_by=start_date,id]

On my home page – and I want to have this puppy NOT display Category ID 4. I’ve located several posts about hiding a category, but I don’t see a recent solution (or I am missing it somehow in my searching).

What are the best practices for this currently? Because we do want this category to show up on the Calendar and other similar shortcodes throughout the site – I’m hoping it can be done with a shortcode?

THanks guys!
Shelly


pickwicksplum

February 24, 2018 at 4:31 pm

Oh… and I should add that we want all Sub categories underneath it to not show (not sure if that will happen by default).


pickwicksplum

February 24, 2018 at 4:45 pm

Oh god – are you guys tired of hearing from me yet?

What about hiding a category on Grid or Table views? We’re going to need that as well.

[ESPRESSO_GRID_TEMPLATE]
[ESPRESSO_EVENTS_TABLE_TEMPLATE]

Is it possible here too? (But not everywhere)
Thanks guys,
Shelly


pickwicksplum

February 24, 2018 at 4:53 pm

Did that make sense? We have a parent category called Ongoing and underneath it we have 4 or 5 sub categories. We want to be able to show and hide those on a per shortcode basis. yikes, right?


Josh

  • Support Staff

February 26, 2018 at 9:33 am

Hi Shelly,

The reason you didn’t get a reply until now (Monday A.M) is because Event Espresso support staff are offline during the weekends.

I’m afraid there isn’t currently a NOT IN-type category parameter. Currently the Event Espresso shortcodes can accept one category parameter, where the list will include the events from the specified category.
The exception is the Calendar add-on’s shortcode can include a parameter list of categories to include. e.g.
[ESPRESSO_CALENDAR event_category_id='category-a, category-b, category-d']
and so on.


pickwicksplum

February 26, 2018 at 11:29 am

Cool. That’s awesome… is it possible to color code categories on the calendar? I see that there is for EE3…


pickwicksplum

February 26, 2018 at 12:00 pm

I found where to set colors!
Thank you!!


pickwicksplum

February 26, 2018 at 7:39 pm

Josh –
Is there ANYWAY this has ever been done – we desperately need this “show everything but” functionality . Has anyone pulled it off using other means?

Is there a plan to add this? What about other non-EE plugins? I’m desperate.
THanks,
S


Josh

  • Support Staff

February 28, 2018 at 9:50 am

Hi Shelly,

The one way is to add some custom PHP programming to filter out that category. Here’s a link to example code that shows how:

https://gist.github.com/joshfeck/3777ceb1ba62a7acecd0adb89f0b7d1d

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

The support post ‘Does events shortcode allow hiding a category?’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 3 months, 3 weeks ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!