Conditional tags
-
I have tried to use conditional tags in my sidebar.php to show certain content for certain pages
<li><?php /* If this is the frontpage */ if ( is_home() ) { ?>
<h2><?php _e('Om vondewall.com'); ?></h2>
<p class="test">Välkommen till <strike>vår</strike> Gustafs lekstuga på webben.
Här hittar Tobias och Toves släktingar och vänner i när och fjärran
bilder så de kan följa med i vad som händer i Tobias och Toves liv.
</li>
<?php } ?><li><?php /* If this is the Arkiv */ if ( is_page(42) ) { ?>
<h2><?php _e('Om arkiven'); ?></h2>
<p class="test">Här kan du leta i vårt arkiv för att hitta exakt vad du söker.
Arkiven är sorterad års- och månadsvis. Du kan även gå igenom alla nyheterna baserade på vilken kategori de har sorterats in under.
</li>
<?php } ?>etc
In my sidebar I have used this approach set up conditional tags f??r f??r 6 pages.
My idea was to use the tags to show a description based on the page the visitor was viewing.
In Firefox and Safari this aproach works fine. In Interner Explorer, however, the right content in the sidebar is shown but the design is messed up. It seems as Internet Explorer leaves a blank space f??r the conditional tags that are not shown.
Any suggestions on how to solve this?
- The topic ‘Conditional tags’ is closed to new replies.