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”
Leave a Reply
You must be logged in to post a comment.