Conditional tag breaks Ie6
-
Hey Fellow bloggers, I have really weird problem which is causing me to nearly run my head into the wall. Hopefully one of you guys can help me out.
Here’s the deal. I use excerpts on my main page and show the full post when a reader clicks to read the rest. For this I decided it would be easy to use the following code :
<div class=”entry_content” style=”
<?php if (is_single())
{echo ‘display:none;’;} ?>”>
<?php the_excerpt(); ?>
</div><div class=”entry_content” style=”
<?php if (is_home())
{echo ‘display:none;’;} ?>”>
<?php the_content(); ?>
</div>Basically this code hides the full content if we’re on the home page and in turn hides the excerpt if the user is on a single page. This works flawless in firefox but gets really messed up in IE6(havent tested 7) where it ads huge weird spaces and duplicates some of the content.
Is this anything anyone has ever experienced? Is there perhaps a better way to deal with conditional tags?
Thanks in advance!
- The topic ‘Conditional tag breaks Ie6’ is closed to new replies.