Support » Theme: Astra » Add content before WooCommerce shop page

  • Resolved Christian

    (@cronosalblog)


    Hi,

    I’m currently looking to add content above the WooCommerce shop page (before the product archive). But editing the Shop page via Gutenberg Editor would result in nothing.

    I also found this code but it doesn’t seem to be working on Astra.
    add_action( 'woocommerce_before_shop_loop' , 'woocommerce_product_archive_description', 10 );

    Any help would be appreciated.

    Thank you.

    • This topic was modified 1 year, 5 months ago by Christian.
    • This topic was modified 1 year, 5 months ago by Christian.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Christian

    (@cronosalblog)

    Nevermind! I found the solution.
    Add this hook to functions.php

    add_action( 'woocommerce_before_shop_loop' , 'woocommerce_before_main_content', 10 );

    Then you can add content above the Shop page.

    Thread Starter Christian

    (@cronosalblog)

    Update, you only need to use this:
    add_action('woocommerce_before_main_content', 10 );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add content before WooCommerce shop page’ is closed to new replies.