Two Conditional Tags with grouping scope

There are many Conditional Tags to deal with WordPress contexts. Some of these Conditional Tags groups several conditions. They works like «Catch them all» tags. It’s very handy. It avoid multiple loops when you test some conditions.

is_archive()

Using this tag allow you to make «one stone two four birds» :

  • is_category()
  • is_tag()
  • is_author()
  • is_date()

is_singular()

This one is very cool too (see below why) :

  • is_single()
  • is_page()
  • is_attachment()

For an exemple, Basics 0.2 (coming soon) use is_singular() when displaying Heading Section in order to not display it when the user browse a single Post, Page or attachement, because these pages display already their own general title, gathered with The Loop.

«Icing on the cake» Basics is build with a function witch add a .singular class to the body_class() function to help you styling all that cool stuff 😉