Archived topic
Move location of Woocommerce Categry Title ABove
3 replies · Started by Ewa on September 17, 2021
Hello,
I am struggling with moving a woocommerce product category h1 and breadcrumbs to the top of the page (that has been made with the help of elements and hooks).
Do you have any idea how to move H1 and breadcrumbs to the very top of the page? Please find attached url
Hi Ewa,
You can try follow the steps:
1. Add this PHP code to create a shortcode for woocommerce breadcrumbs:
add_shortcode( 'woocommerce_breadcrumbs', function() {
ob_start();
woocommerce_breadcrumb();
return ob_get_clean();
} );
How to add PHP: https://docs.generatepress.com/article/adding-php/
2. Create a block element - page hero, set page hero as block element type, set product category archive as loation.
https://docs.generatepress.com/article/block-element-page-hero/
3. Add a dynamic H1 title and a shortcode block to add [woocommerce_breadcrumbs].
Let me know if this helps :)
Thank you very much for your suggestions
You are welcome :)