I have this PHP-script that ads a shortcode at the top of my wooCommerce shop-page.
add_action( 'woocommerce_archive_description',
'woocommerce_archive_description', 15 );
function woocommerce_archive_description() {
echo do_shortcode("[my-shortcode]");
}
It works as I expect it to. But if I'd want the shortcode to appear within a certain div with a certain class - or even better: Append it after a certain element with a class.
This code is auto generated:
<button class="button" data-selector="astra-off-canvas-sidebar-wrapper"><span class="astra-woo-filter-icon"></span><span class="astra-woo-filter-text">PRODUKTSØK</span></button>
So Preferably I would love to append the shortcode to the page, after the above button.
How would you go about that ?