Looking to interact with the Classic Responsive Skin in a programmatic way? Use these hook locations to do anything you want, wherever you want!
Hooks Common to All Templates
wp_head
hook_top_body
โ insert anything before the HTML output (just after the opening<body>
tag) on every pagehook_bottom_body
โ insert anything after the HTML output (just before the closing</body>
tag) on every pagewp_footer
Template- and Context-specific Hooks
In the Classic Responsive Skin, the following elements each have four hooks associated with them by default:
- container
- header
- columns
- content
- archive_intro
- post_box_archive
- post_box_post_page
- headline_area
- byline
- headline_area
- post_comments
- page_comments
- comments
- comment_head
- comment_footer
- comment_form
- comments
- prev_next
- sidebar
- content
- footer
If each of the above elements can be represented by $hook
, then the four hooks available on each element are as follows:
hook_before_$hook
โ before the opening taghook_top_$hook
โ after the opening taghook_bottom_$hook
โ before the closing taghook_after_$hook
โ after the closing tag
Using the container
element as an example, these are its four hooks:
hook_before_container
hook_top_container
hook_bottom_container
hook_after_container
As you can see, the Classic Responsive Skin provides many specific hook locations for you to use in its custom.php
file. However, you’re not limited by the hooks listed hereโyou can always add your own hook locations anywhere you want at any time!