• Home
  • Getting Started
  • Home
  • Getting Started

Theme Hooks

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 the sidebar, we’ll use dorya_sidebar_before hook. The code example would be:

PHP
1
2
3
4
add_action( 'dorya_sidebar_before', 'dorya_add_sidebar_message' );
function dorya_add_sidebar_message() {
  echo esc_html__( 'Sidebar Message', 'dorya' );
}

List of available Hooks:

  • dorya_head_top
  • dorya_head_bottom
  • dorya_header_before
  • dorya_header
  • dorya_header_after
  • dorya_masthead
  • dorya_menu_before
  • dorya_menu_after
  • dorya_last_menu_item_after
  • dorya_body_top
  • dorya_body_bottom
  • dorya_primary_content_top
  • dorya_primary_content_before
  • dorya_primary_content_query
  • dorya_primary_content_after
  • dorya_primary_content_bottom
  • dorya_comments_before
  • dorya_comments
  • dorya_comments_after
  • dorya_entry_section_before
  • dorya_entry_header_before
  • dorya_entry_header
  • dorya_entry_header_after
  • dorya_content_before
  • dorya_content_top
  • dorya_content_bottom
  • dorya_content_after
  • dorya_entry_featured_image
  • dorya_entry_content_top
  • dorya_entry_content_bottom
  • dorya_page_title_before
  • dorya_page_title_after
  • dorya_sidebar_before
  • dorya_sidebar_after
  • dorya_footer_before
  • dorya_footer
  • dorya_footer_after
  • dorya_head_top
  • dorya_head_bottom
  • dorya_header_before
  • dorya_header
  • dorya_header_after
  • dorya_masthead
  • dorya_menu_before
  • dorya_menu_after
  • dorya_last_menu_item_after
  • dorya_body_top
  • dorya_body_bottom
  • dorya_primary_content_top
  • dorya_primary_content_before
  • dorya_primary_content_query
  • dorya_primary_content_after
  • dorya_primary_content_bottom
  • dorya_comments_before
  • dorya_comments
  • dorya_comments_after
  • dorya_entry_section_before
  • dorya_entry_header_before
  • dorya_entry_header
  • dorya_entry_header_after
  • dorya_content_before
  • dorya_content_top
  • dorya_content_bottom
  • dorya_content_after
  • dorya_entry_featured_image
  • dorya_entry_content_top
  • dorya_entry_content_bottom
  • dorya_page_title_before
  • dorya_page_title_after
  • dorya_sidebar_before
  • dorya_sidebar_after
  • dorya_footer_before
  • dorya_footer
  • dorya_footer_after

Was this helpful?

Yes  No
Related Articles
  • GDPR
  • Multilingual Management With WPML
  • Theme Translation
  • Site Performance

No luck finding what you need? Contact Us

Others
  • Theme Hooks
  • GDPR
  • Multilingual Management With WPML
  • Theme Translation
  • Site Performance
Categories
  • Blog & Pages
  • Customization
  • Elementor
  • Getting Started
  • Others
  • Premium Features

  Theme Translation

Site Performance  

  • © 2023 deothemes.com. All Rights Reserved.