Support » Fixing WordPress » is_single() disabled? somehow?

  • fireundubh


    The is_single() function is not working in my theme for whatever reason.

    <?php if(is_single()): ?>
    <?php include(TEMPLATEPATH . '/footer2.php'); ?>
    <?php else: ?>
    <?php get_footer(); ?>
    <?php endif; ?>

    That just doesn’t work… The page executes as though there were no conditions and seems to skip directly to get_footer(). (I’ve tested this with and without single.php.)

    If I were to guess, I’d say that WordPress simply isn’t classifying posts in a way that is_single() can identify.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Douglas Karr


    I am having the same problem, I can not get is_single to work in any way.



    It would help to examine the source of the template(s) this is used in. For example, is there any instance of query_posts() in it, which can whack conditional query properties.

    Douglas Karr


    My theme is just a modified WordPress Default theme. I don’t use query_posts anywhere in the theme.



    Then what:

    1. version of WordPress is used.
    2. template is_single() occuring in.
    3. is the code for the if statement.

    Also, do any other Conditional Tags work for you?



    I had the same problem (i think). To me it solved when I reinstalled the theme. I still don’t know what caused it but it works fine now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘is_single() disabled? somehow?’ is closed to new replies.