Issue with is_home() condition on WP 3.3
-
Hello !
I’m working on a theme using different thumbnail sizes on blog homepage. My code was working fine before the update. And now… It looks like the condition if(is_home() && has_tag(array(‘place1’, ‘place2’, ‘place5’))) does not work anymore… When I remove the is_home() part, it works fine. But I need it… Here is the code.
1st try, working fine before WP 3.3 :
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class='thumbnail-image'> <a href='<?php the_permalink() ?>'> <?php if(is_home() && has_tag(array('place1', 'place2', 'place5'))) { the_post_thumbnail('home-smallpost-thumbnail'); } else{ the_post_thumbnail('home-bigpost-thumbnail'); } ?> </a> </div> ...
2nd try was this :
if(is_home()) { if(has_tag(array('emplacement1', 'emplacement2', 'emplacement5'))) { the_post_thumbnail('home-smallpost-thumbnail'); } }
3rd try was the same, without the if(is_home()){} part (so only the has_tag() part) and it works fine…
I’m completely lost. Why should the is_home() condition break ? Did you experience this kind of problem lately ? Do you see any explaination ?
I hope to hear from someone soon !
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Issue with is_home() condition on WP 3.3’ is closed to new replies.