To render shortcode before products in woocommerce shop page ( http://localhost/shop/ ) you will have to add and use next function to wp-content/themes/kleo-child/functions.php

Replace this shortcode :

COPY CODE


	<div class="panel-group panel-kleo  icons-to-left" id="accordion-1" data-active-tab="1">
			<div class="panel"><div class="panel-heading"><div class="panel-title">
				<a href="#acc-1-2-d" data-parent="#accordion-1" data-toggle="collapse" class="accordion-toggle">Section 1<span class="icon-closed"></span> 
					<span class="icon-opened"></span></a></div></div><div id="acc-1-2-d" class="panel-collapse collapse in"><div class="panel-body">
				
	<div class="kleo_text_column wpb_content_element ">
		<div class="wpb_wrapper">
			<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>

		</div> 
	</div> </div></div>
</div><div class="panel"><div class="panel-heading"><div class="panel-title">
				<a href="#acc-1-3-d" data-parent="#accordion-1" data-toggle="collapse" class="accordion-toggle">Section 2<span class="icon-closed"></span> 
					<span class="icon-opened"></span></a></div></div><div id="acc-1-3-d" class="panel-collapse collapse"><div class="panel-body">
				
	<div class="kleo_text_column wpb_content_element ">
		<div class="wpb_wrapper">
			<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>

		</div> 
	</div> </div></div>
</div>
	</div> 

With your desired shortcode

COPY CODE
function add_content_before_woo_shop() {

        if( is_shop() ){
            echo do_shortcode('
            
	<div class="panel-group panel-kleo  icons-to-left" id="accordion-4" data-active-tab="1">
			<div class="panel"><div class="panel-heading"><div class="panel-title">
				<a href="#acc-4-5-d" data-parent="#accordion-4" data-toggle="collapse" class="accordion-toggle">Section 1<span class="icon-closed"></span> 
					<span class="icon-opened"></span></a></div></div><div id="acc-4-5-d" class="panel-collapse collapse in"><div class="panel-body">
				
	<div class="kleo_text_column wpb_content_element ">
		<div class="wpb_wrapper">
			<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>

		</div> 
	</div> </div></div>
</div><div class="panel"><div class="panel-heading"><div class="panel-title">
				<a href="#acc-4-6-d" data-parent="#accordion-4" data-toggle="collapse" class="accordion-toggle">Section 2<span class="icon-closed"></span> 
					<span class="icon-opened"></span></a></div></div><div id="acc-4-6-d" class="panel-collapse collapse"><div class="panel-body">
				
	<div class="kleo_text_column wpb_content_element ">
		<div class="wpb_wrapper">
			<p>I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.</p>

		</div> 
	</div> </div></div>
</div>
	</div> 
        ');

        }

}
add_action('kleo_before_main_content','add_content_before_woo_shop');

NOTE : Child theme needs to be installed and activated.

For other conditions than is_shop please check the WooCommerce conditional tags page : https://docs.woocommerce.com/document/conditional-tags/

Log in with your credentials

Forgot your details?