Hi, I’m using wordpress and woo commerce and i have a different banner slider on every product page and another on the main category page. I have tried using php to show the banner by id and by product title but it makes no difference, the error is still the same. On the main category page the main category banner shows along with the first product in that category, so two banners on the page. What am i doing wrong, surely by using an if statement that only works by ID, the banner should only work on this ID?
Here is the code:-
[php]
<?php if(is_product_category( 'powders' ) ) { echo do_shortcode('[smartslider2 slider="14"]'); } ?> <?php if(get_the_ID()==78) { echo do_shortcode('[smartslider2 slider="11"]'); } ?> <?php if(get_the_ID()==82) { echo do_shortcode('[smartslider2 slider="12"]'); } ?> <?php if(get_the_ID()==85) { echo do_shortcode('[smartslider2 slider="13"]'); } ?>[/php]