• Resolved Carlos Pereira

    (@enrique71)


    Hi there,
    Found this post which is close to what my question is.

    Does that imply that I will need to add duplicate post category names into the tribe_events taxonomy for events to be treated as posts within those post categories?

    For example, let’s say I have two post categories (in the main WP taxonomy) called “women’s history” and “genealogy”: if I add those as tribe_events categories, and then create a post listing query for “genealogy”, it will list events with posts? Or, will it create a heading “Genealogy” followed by an event and then “Genealogy” again followed by a series of posts?

    (Even though it’s out of scope here, I’ll mention I’m also using Pods for extending taxonomies.)

    Thanks for your expert insights.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Truman

    (@tdorn)

    Hi there,

    So I think I am understand this correctly, you are trying to set up an Event as a post, and you are asking if you need to use post the Post categories and the Event categories?

    If you create an event as a post, it will use the same post categories, vs creating the event as normal as an event, that uses a different set of categories.

    If I am not understanding this correctly, please let me know and I can continue to assist!

    Thread Starter Carlos Pereira

    (@enrique71)

    Apologies for my poorly worded question! I am looking to have both posts and TEC Events show as results when a user queries a particular category.

    I managed to add the following code to functions.php to associate post type tribe_events with the main site Categories:

    
    <pre><code><?php
    /**
     * Plugin Name: Tribe Event Categories
     * Description: Add Categories to Tribe Events post type.
     */
    add_filter(
    	'tribe_events_register_event_type_args',
    	function( $a ) {
    		$a['taxonomies'][] = 'category';
    		return $a;
    	}
    );

    This does allow me to add categories to events, however when I go to the category listing page (for example https://mysite.test/category/subjects/genealogy/), posts show up but tribe_events don’t.

    Thanks very much for your reply, Truman – apologies for the mickey mouse question, but what else am I missing?

    Plugin Support Truman

    (@tdorn)

    Hi Carlos,

    So I was actually wrong on my initial reply, Events and Posts already share the same categories, and there is a setting under Events > Settings > General called “Include events in main blog loop” to include events in the main loop for posts. This should fix the issue where the events are not showing up when you search a category.

    Thread Starter Carlos Pereira

    (@enrique71)

    Thank you! I need to find time to read the documentation lol. Just have about 30 plates in the air on this website at the moment!!

    Plugin Support Truman

    (@tdorn)

    Carlos, you are most welcome! I totally understand!

    Thread Starter Carlos Pereira

    (@enrique71)

    Thanks again for your help – closing the thread.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Question on tribe_events categories main categories’ is closed to new replies.