Home › Forums › Calendar Products › Events Calendar PRO › hiding the category results on an event page
- This topic has 11 replies, 3 voices, and was last updated 7 years, 6 months ago by Monica Filos.
-
AuthorPosts
-
October 16, 2016 at 5:19 pm #1177545Monica FilosParticipant
Hi there, I have read a good number of posts on this issue and I have concluded that all the answers refer to filtering the categories… people wanting to exclude events pertaining to a given category. Such is not my problem. So I will try my best to describe my need here.
Since categories and tags behave differentely and I really dont want my events to show up on the blog area, I found myself with only one area to do all my taxonomy, which is the category area. So I have two parent categories: 1. to show and 2. to not show to the public because are for my internal control and to later be able to open such pages based on such classifications.
Creating all that was easy. And I do want all my events to show up (meaning I dont want some of such events excluded because I am excluding a category). What I dont want is all such LABELS to show up on the category area of my front-end main event page.
For example, For an event that has “World”, “Etiquette”, “Event Code”
I would only like for the public to read on the main event page the categories “World” & “Etiquette”If I go to functions.php and do all that about the slugs, I understood that will prevent my event from showing up if the slug was “event-code” (to follow with my example), right? So, how can I go around this?
Thanks for your help.
Monique- This topic was modified 7 years, 6 months ago by Monica Filos.
- This topic was modified 7 years, 6 months ago by Monica Filos.
October 17, 2016 at 3:03 pm #1177972AndrasKeymasterHey Monique,
Thanks for going Pro and welcome to the forums!
Let me help you out with your questions.
To be able to give you full support on this, could you please share your system information with me? Here’s a handy guide how you can do that:
https://theeventscalendar.com/knowledgebase/sharing-sys-info/As a second, could you share with me what you me with “do all that about the slugs” ? 🙂
Thanks! I’ll be waiting for your answer.
Cheers,
AndrasOctober 17, 2016 at 6:33 pm #1178077Monica FilosParticipantThis reply is private.
October 17, 2016 at 6:47 pm #1178083Monica FilosParticipantThis reply is private.
October 17, 2016 at 6:52 pm #1178087Monica FilosParticipantThis reply is private.
October 18, 2016 at 8:17 am #1178322AndrasKeymasterSalut Monique,
No worries about the button, it didn’t close the thread and I undid it.
Definitely hiding the hole category section is the easiest. Paste this snippet into your child theme’s functions.php file:
add_filter( 'tribe_get_event_categories', function( $html ) { return; } );
Let me know how this works out.Cheers,
AndrasOctober 18, 2016 at 8:39 am #1178344Monica FilosParticipantHi András, this was PERFECT!!! Thank you so much for your help!
Regards,
MoniqueOctober 18, 2016 at 8:48 am #1178352Monica FilosParticipantThis reply is private.
October 19, 2016 at 3:34 am #1178972AndrasKeymasterHi Monica,
I cooked up something for you.
Copy this template to your child theme folder by creating a file at [your-theme]/tribe-events/pro/modules/meta/additional-fields.php
https://gist.github.com/andrasguseo/a791306e1591c7638e088a4a36c71b8d
Then you might want to adjust in the middle the
$title_of_fields
list.
That’s all to it.Let me know how that works out!
Cheers,
AndrasOctober 19, 2016 at 1:32 pm #1179433Monica FilosParticipantHi András, that was exactly what I needed!!! Excellent results, see for yourself on the attached image!
You rule!!!
Regards,
MoniqueOctober 20, 2016 at 8:46 am #1179834AndrasKeymasterTrés bien! 🙂 I’m super stoked to see it help and your site is one step closer to perfection!
As an extra tip, you can easily modify the code and add a dash ‘-‘ before each of the categories, in case you want to.
Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic in the forum and we will help you out.
Good luck with your project!
Cheers,
AndrasPS: If you like our plugin, and you didn’t yet do so 🙂 we would be happy to receive a review in the wordpress.org repository. Thanks!
https://wordpress.org/support/view/plugin-reviews/the-events-calendarPS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!
-
AuthorPosts
- The topic ‘hiding the category results on an event page’ is closed to new replies.