Add Hooks to Alyeska (all Theme Blvd themes) Pages

I love the Theme Blvd Themes. Plenty of user friendly features, like drag and drop templates and easy to use sliders. One thing I was missing was action hooks at the top and bottom of the page content. There is a themeblvd_content_top hook, but it is outside of entry-content. I wanted something closer in.

Here is a quick rundown of how to add these hooks:

The relavent code is in page-content.php so we need to copy this file completely from the alyeska theme folder to the alyeska-child theme folder. This is “old-school” WordPress hierarchy stuff, where WordPress looks in the child theme first when a template file is called for (ignoring the main theme file meaning that an update to the main theme won’t effect the child theme code). We will get back to this file in a few minutes.

Now in functions.php of the child theme we need to create a couple of fuctions that call Wordpess’s do_action() functions

do_action() is the function which is the actual “hook”. We generally wrap it like this to keep things cleaner in the body of the code.

Now back to page-content.php. It looks like this:

We just add in our two functions after lines 8 and 10 and we get this:

that’s it now we use like any other hook: