Additional Taxonomies for Posts and Replies
-
Hi there,
I’m looking for a general advice if I’m hading in the right direction how to allow users to categorise their topics and replies? I’m making progess but having trouble to display those topics in the term archives, display the terms in the forum posts, etc.
In building in custom taxonomies should I be building on top of the existing topic tags, making them hierarchical –
Or taking the approach of registering two new taxonomies –
- ‘region’ eg ‘Australia, New Zealand, Tasmania’
- ‘issue’ eg ‘homelessness, rough sleeping, couchsurfing
I’ve then added a term picker to the new topic form –
But I’m stuck getting topics/replies to display on the the term archives,
this doesn’t seem to work to eg to display topic on this archive
https://www.forum.backtofrontdesign.co/region/victoria/
am i using the correct post type slugs?function add_post_types_to_archives( $query ) { // We do not want unintended consequences. if ( is_admin() || ! $query->is_main_query() ) { return; } if ( is_category() && empty( $query->query_vars['suppress_filters'] ) ) { // Add more slugs with the other CPTs. $post_types = array( 'topic'); $query->set( 'post_type', array_merge( array( 'post' ), $post_types ) ); } }
I’ll keep persevering to display the terms on forum archives and single topics, but any advice or assistance from the community would be so much appreciated to get this campaign up and running.
A project for https://www.oldertenants.org.au/
- You must be logged in to reply to this topic.