{"id":1975,"date":"2019-04-11T03:39:17","date_gmt":"2019-04-11T03:39:17","guid":{"rendered":"https:\/\/docs.deothemes.com\/everse\/?post_type=manual_kb&#038;p=1975"},"modified":"2020-10-24T08:44:54","modified_gmt":"2020-10-24T08:44:54","slug":"theme-hooks","status":"publish","type":"manual_kb","link":"https:\/\/docs.deothemes.com\/everse\/knowledgebase\/theme-hooks\/","title":{"rendered":"Theme Hooks"},"content":{"rendered":"<p>Theme hooks allows you to hook into a theme functionality without modifying the core files. Read more about Actions and Filters API here &#8211; <a href=\"https:\/\/codex.wordpress.org\/Plugin_API\">https:\/\/codex.wordpress.org\/Plugin_API<\/a><\/p>\n<h3>How to use Hooks.<\/h3>\n<p>In your child theme edit <strong>functions.php<\/strong> and add your scripts. Let&#8217;s say you want to add something before sidebar, we&#8217;ll use <strong>everse_sidebar_before <\/strong>hook. The code example would be:<\/p>\n<pre class=\"lang:php decode:true\">add_action( 'everse_sidebar_before', 'everse_add_sidebar_message' );\r\nfunction everse_add_sidebar_message() {\r\n  echo esc_html__( 'Sidebar Message', 'everse' );\r\n}<\/pre>\n<h3>List of available Hooks:<\/h3>\n<ul>\n<li>everse_head_top()<\/li>\n<li>everse_head_bottom()<\/li>\n<li>everse_header_before()<\/li>\n<li>everse_header()<\/li>\n<li>everse_header_after()<\/li>\n<li>everse_masthead()<\/li>\n<li>everse_menu_before()<\/li>\n<li>everse_menu_after()<\/li>\n<li>everse_last_menu_item_after()<\/li>\n<li>everse_body_top()<\/li>\n<li>everse_body_bottom()<\/li>\n<li>everse_primary_content_top()<\/li>\n<li>everse_primary_content_before()<\/li>\n<li>everse_primary_content_query()<\/li>\n<li>everse_primary_content_after()<\/li>\n<li>everse_primary_content_bottom()<\/li>\n<li>everse_comments_before()<\/li>\n<li>everse_comments()<\/li>\n<li>everse_comments_after()<\/li>\n<li>everse_entry_section_before()<\/li>\n<li>everse_entry_header_before()<\/li>\n<li>everse_entry_header()<\/li>\n<li>everse_entry_header_after()<\/li>\n<li>everse_entry_featured_image()<\/li>\n<li>everse_entry_content_top()<\/li>\n<li>everse_entry_content_bottom()<\/li>\n<li>everse_page_title_before()<\/li>\n<li>everse_page_title_after()<\/li>\n<li>everse_sidebar_before()<\/li>\n<li>everse_sidebar_after()<\/li>\n<li>everse_footer_before()<\/li>\n<li>everse_footer()<\/li>\n<li>everse_footer_after()<\/li>\n<\/ul>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":4,"template":"","format":"standard","manualknowledgebasecat":[48],"manual_kb_tag":[],"class_list":["post-1975","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-others"],"_links":{"self":[{"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/manual_kb\/1975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":11,"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/manual_kb\/1975\/revisions"}],"predecessor-version":[{"id":2152,"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/manual_kb\/1975\/revisions\/2152"}],"wp:attachment":[{"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/media?parent=1975"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/manualknowledgebasecat?post=1975"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/docs.deothemes.com\/everse\/wp-json\/wp\/v2\/manual_kb_tag?post=1975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}