Remove the "Event Category" under Details on the single event view

Home Forums Calendar Products Events Calendar PRO Remove the "Event Category" under Details on the single event view

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #948170
    meredy
    Participant

    I would like to remove the category label and link from the single event details view. How would I do that?
    Details
    Date:
    Time:
    Event Category: (this is the one I want to delete from this view)
    Duration:
    Additional Performances:

    #948250
    Barry
    Member

    Hi there!

    The first thing to do is read through our Themer’s Guide, which covers the basics of safely overriding and customizing our templates. In this particular case you will probably wish to modify 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>'
    	)
    );
    ?>

    Does that help?

    #951741
    Lars
    Participant

    Hi

    We are trying to do the same but with no luck. It doesn’t make any difference.

    Actually deleting the whole “modules” folder makes no difference. Are we missing something here? Has these files moved to a different location?

    #951837
    Barry
    Member

    Hi Lars,

    Actually deleting the whole โ€œmodulesโ€ folder makes no difference. Are we missing something here?

    Perhaps the problem and cause are different in your case? Would you mind posting a fresh topic of your own for this?

    Thanks!

    #951871
    Lars
    Participant

    Sorry, this was due to server cache. What you suggest regarding removing categories works fine.

    #951917
    Barry
    Member

    Glad it’s sorted ๐Ÿ™‚


    @meredy
    : how are you getting on here?

    #952257
    meredy
    Participant

    thanks for the code!

    #952331
    meredy
    Participant

    One more question–if I apply this code will it only remove the category link from the “single event page”? In other words could I still type in “http://mysite/events/category/some-category/&#8221; and get a calendar page?

    #952333
    Barry
    Member

    Exactly, yes. We’re changing the information shown in single event pages – but we aren’t stopping visitors from querying for events in a particular category … so:

    In other words could I still type in โ€œhttp://mysite/events/category/some-category/โ€ and get a calendar page?

    Yes, that’s correct ๐Ÿ™‚

    #952343
    meredy
    Participant

    Great! Now I just have to get comfy with where to place this code as I am using Church-Event template and they already have a tribe events folder which doesn’t have details.php in it–so do I go back to your plugin folder and grab the details.php file and stick it (altered) into their tribe-events/modules/meta folder (along with the only other file they have there (organizer.php))?

    #952396
    Barry
    Member

    So assuming they haven’t done anything really crazy, yes, you would copy modules/meta/details.php from the plugin’s views directory and add it to your theme’s tribe-events directory, so you end up with:

    themes/YOUR_THEME/tribe-events/modules/meta/details.php

    Just as you said, really ๐Ÿ™‚

    #956642
    Barry
    Member

    Hi!

    It’s been a while so I’m going to go ahead and close this topic.

    • Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
    • Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context

    Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Remove the "Event Category" under Details on the single event view’ is closed to new replies.