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 experience Kelowna WordPress developer. Or, if you’re in Kelowna and need a new WordPress website for your business, visit our Website Design page now to get started.