Hi,
I'm working on a wordpress website where every product page has its own top banner that appears on the page using php. This works fine on the products but when I try to have a different banner on the category page it shows the banner that was the first product banner I added to the category see below ID 78.
Can anyone help?
Here is my code for the three products in the same category, this works fine. (please note I'm a PHP newbe)
<?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"]');
}
?>
This is the code for the category banner
<?php
if(is_category(10)) {
echo do_shortcode('[smartslider2 slider="14"]');
}
?>
Any ideas what the problem is?