Product slider shortcode

Te slider created on this page https://www.commissionit.co.uk/product-slider is a woocommerce one however I can’t see where to enter the shortcode so the slider so it shows up on my homepage and at the top of the shop? https://www.commissionit.co.uk/shop

Thanks

Hi there,

Please login through FTP then try adding this code in the wp-content/themes/x-childfunctions.php file of the child theme:


function add_slider() {
 if ( is_shop() || is_front_page()() ) {
  echo do_shortcode('[the-shortcode]');
 }
}
add_action('x_after_the_content_begin','add_slider');

Please replace [the-shortcode] with the appropriate shortcode you are using.

Hope this helps.

Thanks so i download https://theme.co/apex/child-themes the x child theme first, then upload to wordpress, then update the functions.php file of that child theme?

Am i not already using a child theme for this page https://www.commissionit.co.uk/shop ?

Thanks

Hi Amin,

Upon checking your site, I see that you don’t have any active child theme yet. Please refer to our child theme setup guide here (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57). install the child theme and activate it.

Then you can add the above code into your child theme’s functions.php file (/wp-content/themes/x-child/functions.php).

Hope that helps.

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