Community Forums › Forums › Archived Forums › General Discussion › Custom Taxonomy Archive Issue
This topic is: resolved
- This topic has 2 replies, 2 voices, and was last updated 6 years, 11 months ago by JPJP9.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
April 4, 2017 at 9:53 pm #204293JPJP9Member
I have a cpt of new equipment (new) with a taxonomy of product (product)
Even though in Admin it shows posts again each taxonomy of product, when I hit view it says Sorry, no content matched your criteria.
The same website has a cpt of staff with a taxonomy of departments which works fine.
Can't for the life of me work out what I've done wrong.
function register_cpt_New() { $labels = array( 'name' => 'New Equipment', 'singular_name' => 'New Equipment', 'menu_name' => 'New Equipment', 'name_admin_bar' => 'New Equipment', 'add_new' => 'Add New', 'add_new_item' => 'Add New New Equipment', 'new_item' => 'New New Equipment', 'edit_item' => 'Edit New Equipment', 'view_item' => 'View New Equipment', 'all_items' => 'All New Equipment ', 'search_items' => 'Search New Equipment', 'parent_item_colon' => 'Parent New Equipment', 'not_found' => 'No New Equipment found.', 'not_found_in_trash' => 'No New Equipment found in Trash.', ); $args = array( 'labels' => $labels, 'public' => true, 'exclude_from_search' =>true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_icon' => 'dashicons-admin-generic', 'query_var' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 2, 'supports' => array( 'title', 'editor', 'thumbnail' ,'genesis-cpt-archives-settings'), 'taxonomies' => array('product') ); register_post_type( 'new', $args ); }
function register_tax_Product() { $labels = array( 'name' => 'Product', 'singular_name' => 'Product', 'search_items' => 'Search Products', 'popular_items' => 'Popular Products', 'all_items' => 'All Products', 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => 'Edit Product', 'update_item' => 'Update Product', 'add_new_item' => 'Add New Product', 'new_item_name' => 'New Product Name', 'separate_items_with_commas' => 'Separate Products with commas', 'add_or_remove_items' => 'Add or remove Products', 'choose_from_most_used' => 'Choose from the most used Products', 'not_found' => 'No Products found.', 'menu_name' => 'Products', ); $args = array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'update_count_callback' => '_update_post_term_count', 'query_var' => true, ); register_taxonomy( 'product', array( 'new'), $args ); }
taxonomy-product.php
http://webtree.website/ta/product/kubota/<?php /** * Products Category Archive * */ genesis();
April 5, 2017 at 3:51 am #204303Victor FontModeratorYou have exclude from search set to true. Clicking on a taxonomy link is a type of search.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?April 5, 2017 at 6:26 pm #204359JPJP9MemberOh Wow - I never would have spotted that - thank you so much
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘General Discussion’ is closed to new topics and replies.