Add Hook Location to WordPress Theme

Adding a WordPress Hook Location anywhere within a theme is easy. The function to use is the do_action WordPress function. Put this line of code in your theme's template file to create the Hook position.

Adding a Hook Location anywhere within a theme is easy. The function to use is the do_action WordPress function.

Put the code in your theme’s template file to create the Hook position. Where the example says your_hook_location_name give it an original name and you’re good to go.

<?php do_action ('your_hook_location_name'); ?>

Hire a WordPress Expert

Get hourly and project based theme customization, theme tweaks, and development help from an experienced Kelowna WordPress developer.  We’ve been building WordPress websites full-time for over a decade. We can help you.