{"id":1975,"date":"2019-04-11T03:39:17","date_gmt":"2019-04-11T03:39:17","guid":{"rendered":"https:\/\/docs.deothemes.com\/emaus\/?post_type=manual_kb&#038;p=1975"},"modified":"2019-09-29T08:17:25","modified_gmt":"2019-09-29T08:17:25","slug":"theme-hooks","status":"publish","type":"manual_kb","link":"https:\/\/docs.deothemes.com\/emaus\/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 simply open <strong>functions.php<\/strong> and add your scripts. Let&#8217;s say you want to add something before sidebar, we&#8217;ll use <strong>deo_sidebar_before <\/strong>hook. The code example would be:<\/p>\n<pre class=\"lang:php decode:true \">add_action( 'deo_sidebar_before', 'emaus_add_sidebar_message' );\r\nfunction emaus_add_sidebar_message() {\r\n  echo esc_html__( 'Sidebar Message', 'emaus' );\r\n}<\/pre>\n<h3>List of available Hooks:<\/h3>\n<div>\n<ul>\n<li>deo_head_top()<\/li>\n<li>deo_head_bottom()<\/li>\n<li>deo_header_before()<\/li>\n<li>deo_header()<\/li>\n<li>deo_header_after()<\/li>\n<li>deo_masthead<\/li>\n<li>deo_body_top()<\/li>\n<li>deo_body_bottom()<\/li>\n<li>deo_primary_content_top()<\/li>\n<li>deo_primary_content_before()<\/li>\n<li>deo_primary_content_query()<\/li>\n<li>deo_primary_content_after()<\/li>\n<li>deo_primary_content_bottom()<\/li>\n<li>deo_comments_before()<\/li>\n<li>deo_comments()<\/li>\n<li>deo_comments_after()<\/li>\n<li>\n<div>deo_entry_featured_image_before()<\/div>\n<\/li>\n<li>deo_entry_featured_image_after()<\/li>\n<li>deo_entry_content_top()<\/li>\n<li>deo_entry_content_bottom()<\/li>\n<li>deo_page_title_before()<\/li>\n<li>deo_page_title_after()<\/li>\n<li>deo_sidebar_before()<\/li>\n<li>deo_sidebar_after()<\/li>\n<li>deo_footer_before()<\/li>\n<li>deo_footer_after()<\/li>\n<\/ul>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"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\/emaus\/wp-json\/wp\/v2\/manual_kb\/1975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":9,"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/manual_kb\/1975\/revisions"}],"predecessor-version":[{"id":2052,"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/manual_kb\/1975\/revisions\/2052"}],"wp:attachment":[{"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/media?parent=1975"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/manualknowledgebasecat?post=1975"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/docs.deothemes.com\/emaus\/wp-json\/wp\/v2\/manual_kb_tag?post=1975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}