Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

How to theme the product archive pages for a custom taxonomy

Home / Forums / Ascend Theme / How to theme the product archive pages for a custom taxonomy

This topic is: Resolved
[Resolved]
Posted in: Ascend Theme
March 5, 2019 at 2:14 pm

Hi Kadence Team,

I created custom taxonomies for woocommerce products and I’m trying to attribute to them the product archive template from the theme.

I use the following in function.php to add a custom taxonomy to products.

// Register Custom Taxonomy
add_action( 'init', 'pqna_custom_taxonomy_Print' );
function pqna_custom_taxonomy_Print() {
$labels = array(
'name' => 'Prints',
'singular_name' => 'Print',
'menu_name' => 'Prints',
'all_items' => 'All Prints',
'parent_item' => 'Parent Print',
'parent_item_colon' => 'Parent Print:',
'new_item_name' => 'New Print Name',
'add_new_item' => 'Add New Print',
'edit_item' => 'Edit Print',
'update_item' => 'Update Print',
'separate_items_with_commas' => 'Separate Print with commas',
'search_items' => 'Search Prints',
'add_or_remove_items' => 'Add or remove Prints',
'choose_from_most_used' => 'Choose from the most used Prints',
);
$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( 'prints', 'product', $args );
register_taxonomy_for_object_type( 'prints', 'product' );
}

To theme the custom taxonomy “Prints” I had a try copying archive-product.php from ascend_premium/woocommerce and renaming it to taxonomy-prints.php and place it into child theme at different places, but without success.

I also had a try following the woocomemrce documentation, but without success.
Using custom attributes in menus and taxonomy archives

Please help!

I will send the site link in a separate private post.

Thanks
Hugo

  • The forum ‘Ascend Theme’ is closed to new topics and replies.