I’ve created a simple plugin for a custom post type. What fully works with an arhive page and a single page. Now I’m trying to add ann taxonomy to the custom post type.

// Register Custom Taxonomy
function gov_categorie() {
     $labels = array(
         'name'                         => _x( 'Categories', 'Taxonomy General Name', 'text_domain' ),
         'singular_name'                => _x( 'Categorie', 'Taxonomy Singular Name', 'text_domain' ),
         'menu_name'                    => __( 'Categorie', 'text_domain' ),
         'all_Veggies'                   => __( 'Alle Categorieën', 'text_domain' ),
         'parent_Veggie'                 => __( 'Hoofd Categorie', 'text_domain' ),
         'parent_Veggie_colon'           => __( 'Hoofd Categorie:', 'text_domain' ),
         'new_Veggie_name'               => __( 'Nieuwe Categorie', 'text_domain' ),
         'add_new_Veggie'                => __( 'Voeg nieuwe Categorie toe', 'text_domain' ),
         'edit_Veggie'                   => __( 'Bewerk Categorie', 'text_domain' ),
         'update_Veggie'                 => __( 'Update Categorie', 'text_domain' ),
         'separate_Veggies_with_commas'  => __( 'Scheidt de categorieën met kommas', 'text_domain' ),
         'search_Veggies'                => __( 'Zoek Categorie', 'text_domain' ),
         'add_or_remove_Veggies'         => __( 'Add of Verwijder Categorie', 'text_domain' ),
         'choose_from_most_used'         => __( 'Meest gebruikte Categorieën', 'text_domain' ),
         'not_found'                     => __( 'Niet gevonden', 'text_domain' ),
);
$args = array(
'labels'                     => $labels,
'hierarchical'               => true,
'public'                     => true,
'show_ui'                    => true,
'show_admin_column'          => true,
'show_in_nav_menus'          => true,
'show_tagcloud'              => true,
);
register_taxonomy( 'categories', array( 'gov_members' ), $args );
}
// Hook into the 'init' action
add_action( 'init', 'gov_categorie', 0 );

Next i did was add 1 taxonomy to a post so içe got a tag / categorie.

Now i want to see a page where i can see the posts with only that taxonomy. But i can’t seem to find something helpfull. So Maybe one of you know where to look?

Read more here: I want to list my custom taxonomy with a custom post type in a plugin


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: