Hello,
Can I use standard WP Categories and Tags with events, instead of the custom ‘event-category’ taxonomy the plug-in uses?
I want to share categories and tags across all post types, including ‘posts’ and ‘events. Is it possible to use default WP Categories or should I create a new custom taxonomy for this?
Thanks for any help you can offer,
Shaun
Shaun Woods
It’s possible, but the plug-in won’t do anything with these taxonomies:
function namespace_share_category_with_pages() {
register_taxonomy_for_object_type( 'post_tag', 'event' );
register_taxonomy_for_object_type( 'category', 'event' );
}
add_action( 'init', 'namespace_share_category_with_pages', 20);
-
This reply was modified 10 months, 1 week ago by Stephen Harris. Reason: Fixed event CPT name
Stephen Harris
Hi Stephen,
Thank-you for your speedy reply and sorry it’s taken me a while to respond – some life-stuff got in the way.
I tried adding that function, but it didn’t have any visible effect – neither Categories nor Tags were selectable from individual Event pages after I added it to functions.php. I checked under Screen Options, to no avail.
I’m not sure if this is what you meant by the plug-in not doing anything with these taxonomies, but I thought I’d mention it, just in case. Failing this, I’ll try adding custom taxonomies across all post types, including events.
Shaun Woods
Sorry Shaun, it should have been 'event'
as the post type not 'eo_event'
. I’ve fixed the original message.
With regards to the plug-in not doing anything with those taxonomies, I mean just that they won’t be displayed by the plug-in (e..g. on event listings or calendars). The templates can be edited to add that, however.
Stephen Harris