Hook contexts

The contexts below can be used to change any of the above hooks in a lot of different situations. The syntax of the hook name is:

tcr_{context}_{tag}

You can find {context} in the table below and {tag} from the two sections above.

Context When it’s used
home on the front page of the site
blog on the blog page
singular viewing a singular post/page
singular-{post_type} viewing a singular post of type {post_type}, e.g. singular-page, singular-post etc
singular-{post_type}-{post_id} viewing a singular post of type {post_type} with the ID {post_id}, e.g. singular-post-12
archive on archive pages
taxonomy on taxonomy archives, i.e. categories and tags
taxonomy-{taxonomy_type} on taxonomy archives of {taxonomy_type}, e.g. taxonomy-post_tag
taxonomy-{taxonomy_type}-{term_slug} on taxonomy archives of {taxonomy_type} for {term_slug}, e.g. taxonomy-post_tag-funny
archive-{post_type} on archives for {post_type}, e.g. archive-page
user on author archives
user-{nicename} on author archives for {nicename}, e.g. user-admin
date on date archives
year on year archives
month on month archives
week on week archives
day on day archives
time on time archives
hour on hour archives
minute on minute archives
search on search results
error-404 on error 404 pages

Still having trouble? Head over to the forums.

Forums