Thesis Hook Reference List
WordPress provides an impressive array of hooks with which you can hook your own actions into, remove default WordPress actions therefrom, or filter the output of posts, comments, and more.
As impressive as the list is, though, they don’t allow you much in the way of modifying your theme. This is where Thesis hooks come into play. This reference should come in handy as you modify your theme.
Thesis Hooks
- thesis_hook_before_html
- Just after the opening
bodytag, before anything else. - thesis_hook_after_html
- Just before the closing
bodytag, after everything else. - thesis_hook_before_header
- Just before the block which usually contains the site name & tagline.
- thesis_hook_after_header
- Just after the block which usually contains the site name & tagline.
- thesis_hook_header
- Determines the content of
div#header. - thesis_hook_before_title
- Within
div#header, before the site title. - thesis_hook_after_title
- Within
div#header, after the site tagline. - thesis_hook_before_content
- Within
div#content, before posts begin. - thesis_hook_after_content
- Within
div#content, after all posts. - thesis_hook_before_post
- Within
div.format_text, before post content. If more than one post is shown on a page, this hook fires before each of them. - thesis_hook_after_post
- Within
div.format_text, after post content. If more than one post is shown on a page, this hook fires before each of them. - thesis_hook_before_headline
- Within
div.headline_area, before the title of the page. If more than one post is shown on a page, this hook fires for each one. - thesis_hook_after_headline
- Within
div>headline_area, after the title of the page. If more than one post is shown on a page, this hook fires for each one. - thesis_hook_byline_item
- Within
p.headline_meta, just before the edit link (if enabled). This hook will only have a noticeable affect if there is a byline to display according to the settings in Thesis Options. If more than one post is shown on a page, this hook is fired for each one. - thesis_hook_before_comment_meta
- Within
dt.comment, before the comment’s meta information. If there is more than one comment on the page, this hook is fired for each one. - thesis_hook_after_comment_meta
- Within
dt.comment, after the comment’s meta information. If there is more than one comment on the page, this hook is fired for each one. - thesis_hook_after_comment
- Within
div.format_text, after the comment’s text. If there is more than one comment on the page, this hook is fired for each one. - thesis_hook_comment_form
- Within
form#commentform, just before the paragraph containing the comment form’s submit button. - thesis_hook_archive_info
- Within
div#archive_info, above the first post only on archive views (e.g., category listings, date listings, search results). - thesis_hook_404_title
- Within
h1. Determines the title of 404 error pages (not thetitlewhich appears in the browser’s title bar). - thesis_hook_404_content
- Within
div.format_text. Determines the content of a 404 error page. - thesis_hook_before_sidebars
- Just within
div#sidebars, before either sidebar or the multimedia box begins. - thesis_hook_after_sidebars
- Within
div#sidebars, after both sidebars. - thesis_hook_after_multimedia_box
- Within
div#sidebars, after the multimedia box. - thesis_hook_before_sidebar_1
- Within
div#sidebar_1 ul.sidebar_list, before sidebar 1’s first widget. - thesis_hook_after_sidebar_1
- Within
div#sidebar_1 ul.sidebar_list, after sidebar 1’s last widget. - thesis_hook_before_sidebar_2
- Within
div#sidebar_2 ul.sidebar_list, before sidebar 2’s first widget. - thesis_hook_after_sidebar_2
- Within
div#sidebar_2 ul.sidebar_list, after sidebar 2’s last widget. - thesis_hook_before_footer
- Just before
div#footer. - thesis_hook_after_footer
- Just after
div#footer. - thesis_hook_footer
- Within
div#footer.
Bonus WordPress Hooks
Just for fun, here are some WordPress hooks which you should be familiar with as well:
- wp_head
- Within
head, useful for outputting meta tags, JavaScript, stylesheet information, and so on. - wp_footer
- Within
div#footer. This is what plugins will use to output to your footer. It is similar to thethesis_hook_footerhook and appears after it. - comment_form
- Within
form#commentformsimilar to the hookthesis_hook_comment_form, but appears after the submit button and has the comment ID number passed to it as a parameter.