Want to control the display of details for a photo view Event Page

Home Forums Calendar Products Events Calendar PRO Want to control the display of details for a photo view Event Page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1609512
    scala
    Participant

    Hello 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!

    #1610888
    Sky
    Keymaster

    Hi 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,
    Sky

    #1610945
    scala
    Participant

    Hello 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,
    Scala

    #1612349
    Sky
    Keymaster

    Hi 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,
    Sky

    #1614980
    scala
    Participant

    Hello 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

    #1615113
    Sky
    Keymaster

    Hi 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,
    Sky

    #1633218
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Want to control the display of details for a photo view Event Page’ is closed to new replies.