Hide category from event page

Home Forums Calendar Products Events Calendar PRO Hide category from event page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1313580
    Michalis
    Participant

    Hi,

    i would like to hide the category section from the events page.

    For example in the URL below:

    http://kerynia.eu/newsite/event/diethnis-imera-paidiou/

    I want to hide:

    Εκδήλωση Category:
    Εκδηλώσεις Δήμου Κερύνειας

    How can i achieve that?

    I am also attaching a screenshot for the goal i need to accomplish.

    Thanks

    #1314808
    Geoff B.
    Member

    Good evening George and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    The most robust way to do this is to create a view override for the single event view.
    You might want to read our Themer’s guide to get a sense of how that works.

    Basically, you can take the code of the view, tweak it and upload it in the  /tribe-events/ folder of your WordPress theme.

    You can follow this thread as a guide https://theeventscalendar.com/support/forums/topic/remove-the-event-category-under-details-on-the-single-event-view/#post-948250

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1315422
    Michalis
    Participant

    Hi,

    I applied the following change:

    /wp-content/plugins/the-events-calendar/src/views/modules/meta/details.php.

    Within that file, simply look for and remove the following section of code:

    <?php
    echo tribe_get_event_categories(
    get_the_id(), array(
    ‘before’ => ”,
    ‘sep’ => ‘, ‘,
    ‘after’ => ”,
    ‘label’ => null, // An appropriate plural/singular label will be provided
    ‘label_before’ => ‘<dt>’,
    ‘label_after’ => ‘</dt>’,
    ‘wrap_before’ => ‘<dd class=”tribe-events-event-categories”>’,
    ‘wrap_after’ => ‘</dd>’
    )
    );
    ?>

    The problem is that this file will be overridden by the original one in the next updates of the plugin.

    How can i avoid that?

    #1315648
    Geoff B.
    Member

    Good evening George,

    Thank you for writing back.

    To avoid that, you need to place the modified view in your child theme, as explained in our themer’s guide.

    The path will be something like: [your-theme]/tribe-events/modules/meta/details.php.

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1315742
    Michalis
    Participant

    Hi,

    It doesn’t seem to work when i place details.php here:

    wp-content/themes/enfold-child/tribe-events/modules/meta/detail.php

    The original path of that file is :

    wp-content/plugins/the-events-calendar/src/views/modules/meta/detail.php

    #1315743
    Michalis
    Participant

    Never mind,

    I managed to make it work.

    Thanks for the help.

    #1316128
    Geoff B.
    Member

    Good evening George,

    I am super stoked to hear that. Kudos!

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

    #1326423
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Hide category from event page’ is closed to new replies.