Theme hooks allow 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 sedona_shop_sidebar_before hook. The code example would be:
1 2 3 4 |
add_action( 'sedona_shop_sidebar_before', 'sedona_shop_add_sidebar_message' ); function sedona_shop_add_sidebar_message() { echo esc_html__( 'Sidebar Message', 'sedona-shop' ); } |
List of available Hooks:
- sedona_shop_head_top
- sedona_shop_head_bottom
- sedona_shop_header_before
- sedona_shop_header
- sedona_shop_header_after
- sedona_shop_logo_before
- sedona_shop_logo_after
- sedona_shop_menu_before
- sedona_shop_menu_after
- sedona_shop_last_menu_item_after
- sedona_shop_body_top
- sedona_shop_body_bottom
- sedona_shop_primary_content_top
- sedona_shop_primary_content_before
- sedona_shop_primary_content_query
- sedona_shop_primary_content_after
- sedona_shop_primary_content_bottom
- sedona_shop_comments_before
- sedona_shop_comments
- sedona_shop_comments_after
- sedona_shop_entry_section_before
- sedona_shop_content_before
- sedona_shop_content_top
- sedona_shop_content_bottom
- sedona_shop_content_after
- sedona_shop_entry_content_top
- sedona_shop_entry_content_bottom
- sedona_shop_page_title_before
- sedona_shop_page_title_after
- sedona_shop_sidebar_before
- sedona_shop_sidebar_after
- sedona_shop_footer_before
- sedona_shop_footer
- sedona_shop_footer_after