Support

Home Forums Event Espresso Premium exclude a category from grid

exclude a category from grid

Posted: January 18, 2016 at 2:26 pm

Viewing 3 reply threads


GreerForce

January 18, 2016 at 2:26 pm

I need to block off a category from the grid template, but have it show on the calendar. I have looked through the forums- can’t find any real answers.. it is to block off private even times.. so availability is displayed to book an event.


Lorenzo Orlando Caum

  • Support Staff

January 18, 2016 at 5:06 pm

Hello, the events grid template add-on does not support excluding a category. However, it does have a parameter to show a specific category:

[ESPRESSO_GRID_TEMPLATE category_slug=your-event-category-slug]

For example, if the events category was called January Events, then this shortcode could be added to a page:

[ESPRESSO_GRID_TEMPLATE category_slug=january-events]


Lorenzo


GreerForce

January 18, 2016 at 7:06 pm

Can I add multiple categories? I tried it and it didn’t work.. Maybe my syntax was wrong, but I added them comma, space separated


Josh

  • Support Staff

January 18, 2016 at 8:49 pm

Hi there,

It turns out that the shortcode will only accept one category slug. There is another way to exclude the category from the grid though. You can filter the query so the category is excluded. Example code follows:

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

You’ll need to modify the above code in two places to fit your site. Where it checks the page ID, you’ll plug in your event grid page’s page ID, and where it sets ‘terms’, your category slug for private events.

Hope that helps!

Viewing 3 reply threads

The support post ‘exclude a category from grid’ 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