I have a wordpress site with WooCommerce and I am trying to display a banner on the main shop page.
I have added the following code to the wrapper-start.php (the shop loop's wrapper).
In the beginning is_page didn't work at all and didn't show the banner, and when I used is_archive it worked, but appeared on all pages with products on them and not just the main shop page. I found a post here that said to add wp_reset_query and use is_page. Now is_page is showing the banner but again, it shows up on all pages (like this one when I want it to show up only on the main /shop page.
Here is the code I have:
<?php wp_reset_query(); if (!is_page('Shop')) { echo do_shortcode("[lbg_kenburnsslider settings_id='2']"); } ?>
So that would imply you want the banner on shop and not elsewhere?
Open in new window
Would put the banner everywhere not with a title of 'Shop'
If you meant to use the slug, it would have been:
Open in new window
Given that a lot of people get confused by this, I always prefer to use the ID:
Open in new window
Finally, are you sure you want to be using ! here?