is_single() is not working properly
-
Hello,
I have a problem.I have a sidebar. In this sidebar I would like to show something just when a single post is displayed.
The code I’m using is:
<?php if ( is_single() ) { ?> <p>Show this just when a single post is displayed</p> <?php } ?>
but it doesn’t work.
When I try with:
<?php if ( is_home() ) { ?> <p>Show this just in the home page</p> <?php } ?>
It shows the sentence everywhere, both in home and in the single post.
What can I do? Thank you!!!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘is_single() is not working properly’ is closed to new replies.