Hi,
I’ve noticed your theme uses hooks to inject html into the template files. Is there some documentation available for this? I’m looking into a way to create a small menu bar (for user navigation / login / logout / etc) above the main menu. How can I achieve this? Which hook should I use?
Ok, I figured it out myself. Just for anyone else looking to inject their own contents or snippets into the existing template, use the following code in your child theme’s functions.php:
// example of how to customize the part before the header nav & logo is injected in the page
add_filter('enlightenment_before_header','enlightenment_before_header_custom');
function enlightenment_before_header_custom() {
// do stuff here, like echoing HTML content or use build-in wordpress functions
echo '<p>this paragraph appears above the header (in the HTML source)</p>';
}
You can replace the ‘enlightenment_before_header’ with each hook that’s available in the template.
-
This reply was modified 9 years, 6 months ago by bo-oz.