Home › Forums › Calendar Products › Events Calendar PRO › Want to control the display of details for a photo view Event Page
- This topic has 5 replies, 2 voices, and was last updated 7 years, 6 months ago by
scala.
-
AuthorPosts
-
August 30, 2018 at 3:36 am #1609512
scala
ParticipantHello TEC Pro,
I want to control the display of details for the photo view Event Page, specifically the Categories.
(Note: have looked in the Themers guide and looked at the Themers guide and I looked into events-pro/src/views/pro/photo/single-event.php
But could not find the part where the Categories are displayed.)To be clearer as to what I want to do, see the image.
I want to stop displaying my “On Photo view” category to the public.
But I need to keep this category because I use it a shortcode. In order to display my chosen events.Where can I control the display of the categories? Or maybe there is a more elegant solution?
cheers!
August 31, 2018 at 11:10 am #1610888Sky
KeymasterHi there,
Thanks for reaching out. I’d be happy to help with your question.
From the screenshot you provided, I’m guessing you actually are wanting to modify the single event page? That is where the “details” section shows up.
The location you were looking in is for the individual events within the main calendar page when set to use “photo” view.
To remove the categories from the details section, copy the-events-calendar/src/views/modules/meta/details.php to [your-theme]/tribe-events/modules/meta/details.php and remove the “echo tribe_get_event_categories” block between lines 128 and 141.
Hope that helps! Please let me know if you have any additional questions about this.
Thanks,
SkyAugust 31, 2018 at 12:26 pm #1610945scala
ParticipantHello Ray,
Good to hear from you.
Nice to see I can remove the categories.
But in my case (as explained in the ticket description) I only want to remove 1 category from the Details section.
1 and only 1 category. The rest SHOULD still be displayed.Is this possible?
Or maybe there is a another solution to stop displaying 1 and only 1 category? (In my case stop displaying the “On Photo view” category).Rave on,
ScalaSeptember 3, 2018 at 9:53 am #1612349Sky
KeymasterHi again,
Please note that we are limited in the amount of support we can provide for customizations such as this here in the forums. That being said, I will try to get you pointed in the right direction.
In order to remove only a single category from the list, you would need to filter the output of the tribe_get_event_categories() function using the ‘tribe_get_event_categories’ filter.
You can see this function in the-events-calendar/src/functions/template-tags/general.php on line 425.
Note that this would remove that category from any place that uses the function, and this may have unintended consequences. If you only want to alter this behavior in that one place, I would just recreate the entire function with a new name, make your changes (remove that category from the list that gets output) and then use that function in the template I suggested above.
Hope that helps!
Thanks,
SkySeptember 6, 2018 at 4:48 am #1614980scala
ParticipantHello Sky,
Thanks for that.
Will head your advice as to “unintended consequences”.
So will keep my hands out of the code “innards”.
Will have to think of something else.
cheers
September 6, 2018 at 7:14 am #1615113Sky
KeymasterHi there,
Just to be clear, if you follow the advice I offered just after that, you will avoid those possible “unintended consequences.” Basically, instead of using the filter to change that list everywhere, you could use the modified function to replace the other in just the spot you want the changes to appear.
Let me know if that makes sense of if you have any other questions.
Thanks,
SkySeptember 28, 2018 at 9:35 am #1633218Support Droid
KeymasterHey 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 ‘Want to control the display of details for a photo view Event Page’ is closed to new replies.
