List of Conditional Tags

Conditional Tags are a boolean data type that can be used in your Template Files to alter the display of content depending on the conditions that the current page matches. They tell WordPress what code to display under specific conditions. Conditional Tags usually work with PHP if /else Conditional Statements and have close relation with WOrdPress Template Hierarchy. .

Warning: You can only use conditional query tags after the WP_Query is set up or  with action hook.

Complete List of Conditional Tags

The Conditions For …

All of the Conditional Tags test to see whether a certain condition is met, and then returns either TRUE or FALSE. The conditions under which various tags output TRUE is listed below. Those tags which can accept parameters are so noted.

The Main Page

The Front Page

The Blog Page

A Single Post Page


Has Post Thumbnail

A Single Page, a Single Post, an Attachment or Any Other Custom Post Type

A Category Page

A Tag Page

An Author Page

A Date Page

Any Archive Page

A Search Result Page

A 404 Not Found Page

Is Dynamic SideBar

Is Sidebar Active

Is Widget Active

Is User Logged in

Email Exists

Username Exists

A Paged Page

Right To Left Reading

An Attachment

Attachment Is Image

A Local Attachment

Post Type Exists

Is Main Query

A New Day

A Syndication

A Trackback

A Preview

Has An Excerpt

Has A Nav Menu Assigned

Is Blog Installed

Part of a Network (Multisite)

An Active Plugin

A Child Theme

Theme supports a feature

Is Previewed in the Customizer