How to only target categories or sub-category pages

Home Forums Calendar Products Events Calendar PRO How to only target categories or sub-category pages

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #811181
    Christian Thomson
    Participant

    Hi there,
    I want to include a list of the categories only on the main Event page, but not on the Categories or Sub-Categories pages.
    I edited the list.php template, and added the function:
    <?php if (tribe_is_event() || !tribe_is_event_category()) { ?>…<?php } ?>
    in order to target the main Event page only, but so that the content disappears when I click on one of the categories. No luck so far…
    Any ideas on how I can achieve that?
    Thank you very much!

    #812785
    Brian
    Keymaster

    Hello,

    Not sure what you are using as the main event page, but here is a list on conditionals that might help you out:

    https://gist.github.com/jo-snips/2415009

    To not show on a Category page you are going to want to use !is_tax()

    Let me know if you can’t get one of those to work and we can work to help you get to the next step.

    Thanks

    #812981
    Christian Thomson
    Participant

    Thanks Brian! The !is_tax did it 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to only target categories or sub-category pages’ is closed to new replies.