Add content after menu but before breadcrumbs

I see the content here: https://theme.co/apex/forum/t/adding-cornerstone-content-in-php/28971/2

However I am trying to get the global block between the menubar and the breadcrumb

http://myowmexperience.com/springboard2/shop/

Im using the following code, but when i try and use other visual hooks, it breaks. Any help on which hook/combo to use?

Blockquote
function shop_before_content() {
echo do_shortcode(’[cs_gb id=4544]’);
}
add_action(‘woocommerce_before_shop_loop’, ‘shop_before_content’);

Blockquote

Thanks so much!

Hello @niconic,

Thanks for posting in!

To resolve your issue, please have your php code updated and use this instead:

function shop_before_content() {
	echo do_shortcode('[cs_gb id=4544]');
}
add_action('x_before_view_renew__landmark-header', 'shop_before_content');

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

Perfect, thank you so much!!

You’re more than welcome, glad we could help.

Cheers!

Is there a way to limit to just the shop and product pages? It shows for the whole site. Thanks in advanced.

Hi,

Yes, please change the code to this.

function shop_before_content() {
        if(x_is_shop() || x_is_product()) {
	     echo do_shortcode('[cs_gb id=4544]');
        }
}
add_action('x_before_view_renew__landmark-header', 'shop_before_content');

Hope that helps

Excellent work as always support! Thanks again.

You’re welcome!
Thanks for letting us know that it has worked for you.

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