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 edit functions.php and add your scripts. Let’s say you want to add something before sidebar, we’ll use everse_sidebar_before hook. The code example would be:
1 2 3 4 |
add_action( 'everse_sidebar_before', 'everse_add_sidebar_message' ); function everse_add_sidebar_message() { echo esc_html__( 'Sidebar Message', 'everse' ); } |
List of available Hooks:
- everse_head_top()
- everse_head_bottom()
- everse_header_before()
- everse_header()
- everse_header_after()
- everse_masthead()
- everse_menu_before()
- everse_menu_after()
- everse_last_menu_item_after()
- everse_body_top()
- everse_body_bottom()
- everse_primary_content_top()
- everse_primary_content_before()
- everse_primary_content_query()
- everse_primary_content_after()
- everse_primary_content_bottom()
- everse_comments_before()
- everse_comments()
- everse_comments_after()
- everse_entry_section_before()
- everse_entry_header_before()
- everse_entry_header()
- everse_entry_header_after()
- everse_entry_featured_image()
- everse_entry_content_top()
- everse_entry_content_bottom()
- everse_page_title_before()
- everse_page_title_after()
- everse_sidebar_before()
- everse_sidebar_after()
- everse_footer_before()
- everse_footer()
- everse_footer_after()