Classic Responsive Skin Hooks

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

  • hook_before_html — insert anything before the HTML output (just after the opening <body> tag) on every page
  • hook_after_html — insert anything after the HTML output (just before the closing </body> tag) on every page

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
        • post_comments
        • page_comments
          • comments
            • comment_head
            • comment_footer
          • comment_form
        • prev_next
      • sidebar
    • 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 tag)
  • hook_top_$hook (just after the opening tag)
  • hook_bottom_$hook (just before the closing tag)
  • hook_after_$hook (after the closing tag)

Using the post_box_archive element as an example, these are its four hooks:

  • hook_before_post_box_archive (before the opening tag)
  • hook_top_post_box_archive (just after the opening tag)
  • hook_bottom_post_box_archive (just before the closing tag)
  • hook_after_post_box_archive (after the closing tag)

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!