[Resolved] Move location of Woocommerce Categry Title ABove

Home Forums Support [Resolved] Move location of Woocommerce Categry Title ABove

Home Forums Support Move location of Woocommerce Categry Title ABove

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1934177
    Ewa

    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

    #1934223
    Ying
    Staff
    Customer Support

    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 ๐Ÿ™‚

    #1941216
    Ewa

    Thank you very much for your suggestions

    #1941869
    Ying
    Staff
    Customer Support

    You are welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.