Skip to:

Additional Taxonomies for Posts and Replies

  • Back to Front


    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
    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() ) {
            if ( is_category() && empty( $query->query_vars['suppress_filters'] ) ) {
    		// Add more slugs with the other CPTs.
    		$post_types = array( 'topic');
    				array( 'post' ),

    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

Viewing 2 replies - 1 through 2 (of 2 total)

  • Back to Front


    Oh I found the error in my code above
    Just replacing

    Still, not sure I’m taking the best approach here,
    maybe I’m missing a simpler way to categorise topics?



    Like a different approach.
    Do you have a confusing system of tags and categories? Look towards plugins make a hierarchy categories and tags, such as “Table of Contents Plus”.
    …automatically creates a context specific index or table of contents (TOC) for long pages (and custom post types) … a sitemap listing pages and / or categories … a unique numbering scheme .. alphabetical sorting of tags and so on

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar