Action woocommerce_before_main_content not works properly
-
Hi to all!
I’ve tried to add a shortcode immediately before woocommerce breadcrumbs.
So I added in my theme this code:
add_action( 'woocommerce_before_main_content', 'mostra_slider', 10, 0 ); if ( ! function_exists( 'mostra_slider' ) ) { function mostra_slider() { //echo "SLIDER"; echo do_shortcode('[rev_slider alias="slider-200px"][/rev_slider]'); //add_revslider('slider-200px'); // this code alternatively but same results } }
The slider are printed as last element of block, just before the content, no matter what priority I use. I’ve tried also with strefront theme.
How can I fix this issue?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Action woocommerce_before_main_content not works properly’ is closed to new replies.