Homepages
- The following condition matches when the homepage is a static page: is_front_page()
- The following condition matches when the first page is a page of the blog: is_home()
Post
- This condition will match
on every post: is_single() - If the current post has the following title: is_single(‘this is the title’)
- If the current post has the following slug: is_single(‘this-is-the-slug’)
- If the current post has the following ID: is_single(‘123’)
Page
- This condition will match on every page: is_page()
- If the current post has the following title: is_page(‘this is the title’)
- If the current post has the following slug: is_page(‘this-is-the-slug’)
- If the current post has the following ID: is_page(123)
Category
- If the current page is a category page or a taxonomy page or a tag page: is_archive()
- If the current category has the following title: is_category(‘this is the title’)
- If the current category has the following slug: is_category(‘this-is-the-slug’)
- if the current category has the following ID: is_category(‘9’)
Special pages
- When the page returns a 404: is_404()
- When the page is the result of a search: is_search()
- When the page is an author: is_author()
- A page with the following author ID: is_author(‘1’)
- A page with the following author slug: is_author(‘john-doe’)
- A page with the following author name: is_author(‘
john doe’)