Show categories on individual events

Home Forums Calendar Products Events Calendar PRO Show categories on individual events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1097540
    Deena
    Participant

    Hi, I’d like to know if there is a any way to have the categories of a specific event show on that event’s post.

    Thanks,
    Deena

    #1098196
    Brook
    Participant

    Howdy Deena,

    That sounds very doable. But there are a few ways to understand what you’re request, would you mind clarifying a bit for me so I can give you specific instructions?

    You will notice that by default the event categories do display for each individual event. For instance go here and scroll down, you will see the labe “Event Categories” and underneath the category that its filed under. Is your theme not showing this? Do you have a link to it? Or are you trying to show the categories on a different page?

    Cheers!

    – Brook

    #1098264
    Deena
    Participant

    Hi Brook,

    Thanks for your reply! You’re right, the categories do show, they just show low down so I forgot that they’re there. šŸ™‚ So I guess my question is now, how can I have them show at the top of the events?

    Here is an example: http://thingstodoinjerusalem.com/event/burlesque-the-body-the-feminist-dilemma/

    Thanks,
    Deena

    #1098844
    Brook
    Participant

    You are welcome!Ā Thanks for elaborating.

    This should be fairly straight forward to do, it will require a little bit of comfort with modifying your theme files. I’ll break down each step:

    1. Familiarize yourself with theĀ Themer’s Guide
    2. Create a theme override forĀ /the-events-calendar/src/views/single-event.php
    3. Copy/paste the following code into that override:
     <?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>',
    )
    );
    ?>

    That code shows the event categories. It wraps each category in the css class .tribe-events-event-categories so you can style it from there. You can paste that code anywhere you want in the theme override, perhaps right underneath the title?

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1105442
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Show categories on individual events’ is closed to new replies.