Templates and the “is” Functions for Wordpress

For example, is_home() is true if the home page is being requested. is_category() is true if a category is being requested. Here is the full list of “is” functions and the requests for which they are true.

  • is_home() - The front page
  • is_single() - A single post
  • is_page() - A static/standalone page
  • is_category() - A category
  • is_author() - An author
  • is_date() - A year, month, or day
  • is_year() - A year
  • is_month() - A month
  • is_day() - A day
  • is_time() - An hour, minute, or second
  • is_archive() - A category, author, or date
  • is_search() - A search
  • is_404() - A 404 page
  • is_feed() - A syndication feed

http://boren.nu/archives/2004/10/16/templates-and-the-is-functions/

No Responses to “Templates and the “is” Functions for Wordpress”

  1. links from Technorati [IMG RSS] WordpressTips WP More Function ProblemWhat Is Autoblogging and How Does It Work?Truths and Consequences of Blogs That Stand OutTemplates and the “is” Functions for Wordpress

Leave a Reply

You must be logged in to post a comment.

Bad Behavior has blocked 1671 access attempts in the last 7 days.