My goal is to add html_block to Shop and ALL Category. Woocommerce

Viewed 16

I used this snippet.

add_action( 'woocommerce_after_main_content', 'add_my_text', 9 ); 
function add_my_text() {
{
        echo do_shortcode( '[html_block id="252"]' ); 
    }
}

One thing went wrong, this html_block has been added to the "product page" ALSO. Is it possible to add it only to the Categories, Shop page, WITHOUT single product page??

In addition, how to do this when I have a sidebar on woocommerce, I would like such a snippet to be on the entire length, and if I have a sidebar, e.g. width 20% and I add such a snippet, it shows up parallel to the sidebar (80% width, and if I give 100% then it overlaps the sidebar, and I would like it to be full of content - right over the footer.)

0 Answers
Related