Woocommerce customization shop page

Hi there,
I’m trying to figure out how to add content at the bottom of the archive woocommerce shop page with shortcodes. I have tried something like this with no success:

remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
add_action('woocommerce_after_main_content', 'custom_avanaa_shop_end', 10);

function custom_avanaa_shop_end() {
  if ( is_shop() ) {
    echo do_shortcode('[gap size="700px"]');
  }
}

Any clue on what I’m doing wrong?
Cheers!

Hi there,

Thanks for writing in! Try changing this line of code:

add_action('woocommerce_after_main_content', 'custom_avanaa_shop_end', 10);

With this:

add_action('woocommerce_after_main_content', 'custom_avanaa_shop_end', 5);

You can checkout this thread as well https://wordpress.org/support/topic/add-text-to-shop-page/

Let us know how this goes!

I tried changing the priority to 5 and it had no effect.
Still clueless about this!

Hello There,

To resolve your issue, please make use of this code instead:

function custom_avanaa_shop_end() {
    echo do_shortcode('[gap size="700px"]');
}
add_action('woocommerce_after_shop_loop', 'custom_avanaa_shop_end', 5);

Please note that custom coding is outside the scope of our support. Issues or conflicts might arise from the use of custom code and further enhancements or troubleshooting should be directed to a third party developer.

We would loved to know if this has work for you. Thank you.

Rock on!
It works!

Awesome!
It’s good to know that it has worked for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.