Skip to main content

functions that return a single boolean value depending on what is currently being viewed

Conditional tags are functions that often take no parameters and return a single boolean value (true or false) depending on what is currently being viewed. Examples of conditional tags include is_home(), is_single(), is_page(), and is_archive(), which will respectively return true when viewing the posts (blog) page, a single post, a page, or a category/tag/author archive, and false otherwise.

Conditional tags are designed for use in theme template files, and generally used on the site . The main exception to this is is_admin(), which returns true when the dashboard or administration panels are being displayed.

Learn more at the WordPress Codex