Top Left Text cha

Web & App Development

  • is_home() – Checks if the blog post index is being displayed. This may or may not be your home page as well.
  • is_front_page() – Checks if your home page is being displayed. This works whether your front page settings are set up to display blog posts (i.e. blog index) or a static page.
  • is_single() – Checks to see whether any type of single post is being displayed (excluding attachments).
  • is_attachment() – Checks if an attachment is displayed.
  • is_page() – Checks if a page is being displayed.
  • is_singular() – Checks whether a single post, attachment or page is being displayed. True is returned if either of those conditions are met.
  • is_category() – Checks whether a category archive page is being displayed.
  • is_search() – Checks if a search results page is being shown.
  • is_tag() – Checks whether a tag archive is being displayed.
  • is_author() – Checks if an author archive page is being displayed.
  • is_archive() – Checks if any type of archive page is being displayed including category, tag, date and author archives.
  • is_sticky() – Checks if a post has been defined as sticky.
  • is_multi_author() – Checks if more than one author has published posts on the website. True is returned if two or more people have published posts. If only one author has published posts, or if no posts have been published at all, false is returned.

There are six time based conditional tags that you will also find useful. These tags refer to date archive pages. For example, the URL is a month based archive page.

If any of the following conditional tags returns true, is_archive() would also be true.

  • is_date() – Checks if it is a date based archive page.
  • is_year() – Checks if it is a year based archive page.
  • is_month() – Checks if it is a month based archive page.
  • is_day() – Checks if it is a day based archive page.
  • is_time() – Checks if it is a time based archive page.
  • is_new_day() – Checks if today is a new day. If the current post was published on a different day from the previous post that was published, it would return true. False will be returned if both posts were published on the same day.

Add comment

Security code

  • No comments found

Leave your comments

Post comment as a guest

Your comments are subjected to administrator's moderation.