• Resolved ravnblade

    (@ravnblade)


    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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Wouldn’t be simpler to just use the index.php for the main page and have a single.php for displaying the single posts? No conditional, no complications. WP “knows” if a single.php is present and it will use it to display your posts in single post view.
    Learn more: Template_Hierarchy

    I would dump that whole theme. The code is really sucky. When we have php turning out CSS we need to quit and get a better job.

    Thread Starter ravnblade

    (@ravnblade)

    Moshu : Thnx, I have a lot to learn about wp, this is my first real blog. I’ll give your solution a go, definately sounds much leaner.

    Root : It’s my own theme, I’m not dumping it lol:P

    Thread Starter ravnblade

    (@ravnblade)

    Worked like a charm – resolved –
    Thanks for the quick response!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conditional tag breaks Ie6’ is closed to new replies.