function that returns boolean if an event is a cateogry

WordPress Event Management, Calendars & Registration Forums General Question function that returns boolean if an event is a cateogry

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 9 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19524

    Is there a function that returns true/false if an event is of a particular category?

    or should I use wordpress is_page() with a slug as an argument somehow?

    Lukas Feddern
    #19525

    the reason for this is that I would like to hide the occurrences of an event on the single event page if they belong to a certain category.

    Lukas Feddern
    #19529

    Hi,

    I achieved what I wanted by making the changes to the single event template using the recurring event query function. Thanks for making the templates so well documented for a beginner like me

    Lukas Feddern
    #19537

    Glad to hear that you’re finding the templates easy to work with.

    For refence you can use has_term(): https://codex.wordpress.org/Function_Reference/has_term – with taxonomy set to event-category

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.