0

I'm new to custom taxonomy. I have created a taxonomy called 'collections", and under collections, I have items like blue shirts, suede shoes, etc. I have a product called a low-top lace-up suede shoe. This shoe belongs to a collection called suede shoes collection. When I visit the product page, I want to see the link of the suede shoes collection as a product meta. This is a link https://ibb.co/whWd6rs to an image to help understand my question

Please how do I get this done?

This is my Taxonomy

    / Register Custom Taxonomy
function custom_taxonomy_Item() {

$labels = array(
'name' => 'Collections',
'singular_name' => 'Collection',
'menu_name' => 'Collections',
'all_items' => 'All Collections',
'parent_item' => 'Parent Collection',
'parent_item_colon' => 'Parent Collection:',
'new_item_name' => 'New Collection Name',
'add_new_item' => 'Add New Collection',
'edit_item' => 'Edit Collection',
'update_item' => 'Update Collection',
'separate_items_with_commas' => 'Separate Collection with commas',
'search_items' => 'Search Collection',
'add_or_remove_items' => 'Add or remove Collection',
'choose_from_most_used' => 'Choose from the most popular Collection',
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'exclude_from_search'   => false,
'supports'              => array( 'title', 'editor', 'custom-fields', 'thumbnail', 'excerpt', 'revisions', 'page-attributes' ) 
);
register_taxonomy( 'collection', 'product', $args );
}
1
  • Can you explain what you mean by "I want to see the link of the custom taxonomy a product meta" using diifferent words? This doesn't make sense, are you referring to a particular part of the frontend that you did not mention? Also I fixed your code block but can you edit your question to include indenting? It's very difficult to read. Right now it's very unclear what your asking about, any information or explanation you can add would be helpful
    – Tom J Nowell
    Nov 27 '21 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.