Home › Forums › Calendar Products › Events Calendar PRO › Hide category from event page
- This topic has 8 replies, 2 voices, and was last updated 6 years, 9 months ago by Michalis.
-
AuthorPosts
-
June 29, 2017 at 10:56 pm #1313580MichalisParticipant
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
June 30, 2017 at 5:34 pm #1314808Geoff B.MemberGood 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.July 3, 2017 at 12:13 am #1315422MichalisParticipantHi,
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?
July 3, 2017 at 3:16 pm #1315648Geoff B.MemberGood 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.July 3, 2017 at 11:35 pm #1315742MichalisParticipantHi,
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
July 3, 2017 at 11:38 pm #1315743MichalisParticipantNever mind,
I managed to make it work.
Thanks for the help.
July 4, 2017 at 8:39 pm #1316128Geoff B.MemberGood 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.
July 26, 2017 at 9:35 am #1326423Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Hide category from event page’ is closed to new replies.