Archived topic
Header Element for Woocommerce Categories
4 replies · Started by Kim on September 18, 2019
Hi there,
I would like to add custom header elements to each woocommerce category showing the category title and the woocommerce breadcrumbs (and remove them from the container section). Is this possible and can you help me with the necessary code?
Many thanks in advance!
BR Kim
Hi there,
The category title should display by default if you use the {{post_title}} template tag in the Header Element - can you confirm?
For the breadcrumbs, we'll have to create a shortcode:
add_shortcode( 'custom_woo_breadcrumbs', function() {
ob_start();
woocommerce_breadcrumb();
return ob_get_clean();
} );
Now you can add [custom_woo_breadcrumbs] to your Header Element.
Let me know :)
I've actually tested the template tag {{post_title}} and it works to display the category name :)
Many thanks! Works all perfectly!
No problem :)