How to Create Hooks in Nexter WordPress Theme?

How to Create Hooks in Nexter WordPress Theme?

Table Of Contents

1. Hooks


The Hooks are the most crucial part of the website, which is the first section on your website. In Nexter, We have followed the concept to give 100% Freedom to your creativity and the power of page builders of WordPress.

You can build a Hooks from any page builder such as Elementor, Gutenberg aka Block Editor, Beaver Builder, and any other WordPress Page Builder.


Step 1 : Go to “Nexter Builder” from WordPress Dashboard and Press “Add New” to create new template for your Hooks.

Step 2 : When you will have a new template created, You need to scroll to the bottom and Check for “Layout” Options of Nexter Builder. There will be options for None | Sections | Pages | Code Snippets from them choose “Sections“. In Sections Select “Hooks”.

Step 3 : You will have more options to choose from Such as Actions Hooks, Priority, Include In, Exclude From, and others. To know about those options more, Scroll down to know more. You need to customize that as per your needs and then Press “Publish”.

Step 4 : Congratulations! You need to select any of your page builder editor option now as your all settings related to Hooks are setup now.

1) Actions Hooks

Will add the contents of the template before the HTML tag
Will add the contents of template as the first things in HTML -> Head tag
Will add the contents of template as the last things in HTML -> Head tag
Will add the contents of template along with wp_head() function content
Will add the contents of template as the last things in HTML -> Body tag
Will add the contents of template before Header template’s content
Will add the contents of template after Header template’s content
Will add the contents of template before page’s main template’s content
Will add the contents of template after page’s main template’s content
Will add the contents of template before the comment section
Will add the contents of template after the comment section
Will add the contents of template before the sidebar template’s content
Will add the contents of template after the sidebar template’s content
Will add the contents of template before the Footer template’s content
Will add the contents of template after the Footer template’s content
Will add the contents of template as the last things in HTML -> Body tag
Will add the contents of template along with wp_footer() function content

2) Priority

Priority is a concept of Template precedence for the same hook used in multiple templates.

If you are using Body Top hook for multiple templates, then the priority option will help you to select which template’s content is going to display before another one’s.

Example :- Your Order of Content

1) Introduction Section
2) Image Slider
3) Instagram Gallery

Then, Priority Should be :-

1) Introduction Section – 10
2) Image Slider – 11
3) Instagram Gallery – 12

3) Display Rules

1. Include In

With this option, you can select more than one location where you want to show the above template.

Using all options mentioned in include in, You will be able to manage your header with great freedom to set that up based on Post Types, User Logged In/Out, Browsers, As per the Post id and lots more ways.

2. Exclude From

With this option, you can select more than one location where you want to hide the above template.

Using all options mentioned in Exclude From, You will be able to manage your header to hide and use alternate based on Post Types, User Logged In/Out, Browsers, As per the Post id and lots more ways.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.