is_single problem!
-
Hi,
I’m having problems with is_single()The problem is that is_single() is supposed to work only on posts, NO “pages” and “attachments”, if I understand it right. Because if not there will be no difference between is_single and is_singular
is_single() returns true if any single post is being displayed
is_singular() returns true when any page, attachment, or single post is being displayed.But If I try to include a file only into a POST
<?php if ( is_single() ) { ?> <link rel="stylesheet" href="style.css" /> <?php } ?>
the css file appears also on attachment pages
example.com/?attachment=123456789 AND THAT AINT SUPPOSED TO HAPPEN.Is there a bug in wordpress or I’m doing something wrong?!!
Thank you!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘is_single problem!’ is closed to new replies.