WordPress at a glance
Home Functions From tag: Conditional tags (page type and request)

Conditional tags (page type and request) (tag)

is_404()

Checks whether the 404 error page is displayed (HTTP 404: page not found). Conditional tag.

is_admin()

Whether the current request is for an administrative interface page.

is_archive()

Conditional tag. Return true when any of the archive pages are shown (Year, Category, Author, Post Type archive...).

is_attachment()

Is the query for an existing attachment page?

is_author()

Is the query for an existing author archive page?

is_blog_admin()

Whether the current request is for a site's admininstrative interface.

is_category()

Conditional tag. Checks whether the category page is displayed or not.

is_comment_feed()

Is the query for a comments feed?

is_customize_preview()

Checks whether the site is being previewed in the WordPress Customizer (the visual theme settings page). Conditional tag.

is_date()

Determines whether the date archive page is displayed. Conditional tag.

is_day()

Determines whether a day archive page is shown (example.com/2009/08/05) — page with posts for a specific day. A conditional tag.

is_embed()

Is the query for an embedded post?

is_feed()

Is the query for a feed?

is_front_page()

Checks whether the main (home) page of the site is displayed. Conditional tag.

is_home()

The conditional tag that checks if the page with the last posts is displayed, usually it is the main page of the site or the blog homepage.

is_month()

Determines whether a monthly archive page is shown (example.com/2009/08) — page with posts for a specific month. A conditional tag.

is_network_admin()

Whether the current request is for the network administrative interface.

is_page()

Checks whether a "static page" is displaying. You can specify an ID, name, or page title to check a specific page. Conditional tag.

is_page_template()

Whether currently in a page template.

is_paged()

Checks whether the pagination page is displayed (page type /page/2, /page/3). Conditional tag.

is_post_type_archive()

Is the query for an existing post type archive page?

is_preview()

Is the query for a post or page preview?

is_robots()

Checks if this is a request to robots.txt file. A conditional tag.

is_search()

Works when the search results page is displayed. Conditional tag.

is_single()

Checks whether the post page of any post type except attachment and page is displayed. Conditional tag.

is_singular()

Checks whether the post page is viewed (post, page, attachment, any post type). Conditional Tag.

is_ssl()

Checks whether secure HTTPS (SSL) connection is used. A conditional tag.

is_tag()

Is the query for an existing tag archive page?

is_tax()

Works on the custom taxonomy archive page. Conditional tag.

is_time()

Determines whether the query is for a time-based archive page (page of posts for the specified time). A conditional tag.

is_trackback()

Is the query for a trackback endpoint call?

is_user_admin()

Whether the current request is for a user admin screen.

is_year()

Determines whether a year archive page is shown (example.com/2009) — page with posts for a specific year. A conditional tag.

wp_doing_ajax()

Determines whether the current request is a WordPress Ajax request.

wp_doing_cron()

Determines whether the current request is a WordPress cron request.