Theme hooks allows you to hook into a theme functionality without modifying the core files. Read more about Actions and Filters API here – https://codex.wordpress.org/Plugin_API
How to use Hooks.
In your child theme simply open functions.php and add your scripts. Let’s say you want to add something before sidebar, we’ll use deo_sidebar_before hook. The code example would be:
1 2 3 4 |
add_action( 'deo_sidebar_before', 'emaus_add_sidebar_message' ); function emaus_add_sidebar_message() { echo esc_html__( 'Sidebar Message', 'emaus' ); } |
List of available Hooks:
- deo_head_top()
- deo_head_bottom()
- deo_header_before()
- deo_header()
- deo_header_after()
- deo_masthead
- deo_body_top()
- deo_body_bottom()
- deo_primary_content_top()
- deo_primary_content_before()
- deo_primary_content_query()
- deo_primary_content_after()
- deo_primary_content_bottom()
- deo_comments_before()
- deo_comments()
- deo_comments_after()
-
deo_entry_featured_image_before()
- deo_entry_featured_image_after()
- deo_entry_content_top()
- deo_entry_content_bottom()
- deo_page_title_before()
- deo_page_title_after()
- deo_sidebar_before()
- deo_sidebar_after()
- deo_footer_before()
- deo_footer_after()