Forums

is_single() noob (7 posts)

  1. Anonymous
    Unregistered
    Posted 5 years ago #

    I can't seem to find any documentation on the is_single() function. Could anyone point me in the general direction of a noob guide to is_single() please?

  2. markjaquith
    Moderator
    Posted 5 years ago #

    This is a new function in Wordpress 1.3, and doesn't really have any documentation that I know of.
    But I can give you the quick and dirty version:
    is_single() returns TRUE if the current page being shown is an individual entry page.
    You can use this in a conditional to display certain stuff only on a "single" page, or to omit certain stuff on a "single" page.
    Here are some of the other "is_X" functions:
    is_404()
    is_archive()
    is_author()
    is_category()
    is_date()
    is_day()
    is_feed()
    is_home()
    is_month()
    is_new_day()
    is_page()
    is_search()
    is_single()
    is_time()
    is_year()
    If you visit my blog at http://txfx.net/ and browse around, look at the source... down at the very bottom of the source I've echoed out the result of each of those.

  3. rubyji
    Member
    Posted 5 years ago #

    Thanks, this list is incredibly helpful!

  4. Heatsink
    Member
    Posted 4 years ago #

    Any idea what would stop the is_single() function from working out of the blue? Mine completely fails to detect when a page is a single page all of a sudden. I've deactivated all my plugins and don't know what else to try.

    Basically, anything I put in a conditional if is_single() fails to execute on single pages...?

    Very confused...

  5. Heatsink
    Member
    Posted 4 years ago #

    double post.....

  6. Heatsink
    Member
    Posted 4 years ago #

    disregard, I'm an idiot...

  7. Heatsink
    Member
    Posted 4 years ago #

    disregard, I'm an idiot...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.