WordPress Plugin API Hooks

Goes in the element of a theme, in header.php. Example plugin use: add JavaScript code.

Goes in footer.php, just before the closing tag. Example plugin use: insert PHP code that needs to run after everything else, at the bottom of the footer. Very commonly used to insert web statistics code, such as Google Analytics.

Typically goes in the Meta section of a Theme’s menu or sidebar; sidebar.php template. Example plugin use: include a rotating advertisement or a tag cloud.

Goes in comments.php directly before the file’s closing tag. Example plugin use: display a comment preview.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.