• Resolved dbazhinov

    (@dbazhinov)


    After enabling the feature called “Include events in main blog loop”, the events show up in my homepage feed successfully. Unfortunately, the categories are not being reported to show as normal posts do. This is not a theme issue but appears that the plugin does not provide the categories in order for them to be displayed in the feed loop.

    Developer – Could you please provide a work-around for the categories to be displayed just the same way as normal posts show categories?

    Thank you.

    • This topic was modified 5 years, 5 months ago by dbazhinov.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author tribalmike

    (@tribalmike)

    Hi @dbazhinov

    Yes. The event categories are using a different taxonomy (tribe_events_cat) than regular WordPress posts (category). That’s why they’re not showing up.

    You would need to go in and modify your theme template to check for the post type ‘tribe_events’:

    if ("tribe_events" === get_post_type()) { ...... }

    If it’s an event, then you can display the event categories using the tribe_get_event_taxonomy() function:

    echo tribe_get_event_taxonomy(get_the_id(), ['sep' => ', ', 'before' => '', 'after' => '']);

    Hopefully that’ll get you pointed in the right direction.

    Mike

    Thread Starter dbazhinov

    (@dbazhinov)

    I appreciate the swift response, thank you.
    Am I missing something here? I’m unable to get the tribe category to show.

    function mytheme_figure_content() {
        echo '<figure class="post-thumbnail">';
                if ("tribe_events" === get_post_type()) {
                tribe_get_event_taxonomy(get_the_id(), ['sep' => ', ', 'before' => '', 'after' => '']); }
            mytheme_post_thumbnail();
            mytheme_category();
            mytheme_posted_by();
        echo '</figure>';
    }
    Plugin Author tribalmike

    (@tribalmike)

    Hi @dbazhinov

    Change get_the_id() to get_the_ID()

    That might do it.

    Mike

    Thread Starter dbazhinov

    (@dbazhinov)

    Nope. ˉ\_(ツ)_/ˉ

    Could I trouble you to try it on a theme on your end?

    Thank you.

    Plugin Author tribalmike

    (@tribalmike)

    Hello again, @dbazhinov

    I just noticed that you don’t have an echo in front of the function. Like this:

    echo tribe_get_event_taxonomy(....

    You’ll need that, too.

    Mike

    Thread Starter dbazhinov

    (@dbazhinov)

    Ah, my bad. Thank you!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Categories do not display in blog loop (“Include events in main blog loop”)’ is closed to new replies.