# Hooks

### after\_header\_menu

It is located in header after main menu.

```php
do_action('after_header_menu', '');
```

### sanil\_header\_contents

```php
<header>
	<?php
	function get_header_contents($logo) {
		ob_start();
		require_once('partials/header-contents.php');
		return ob_get_clean();
	}	
	echo apply_filters('sanil_header_contents', get_header_contents($logo), $logo);
	?>
</header>
```

### sanil\_header\_main\_menu

```php
<div id="main-menu-wrapper" class="d-none d-lg-block">
    <?php
    function sanil_header_main_menu() {
        ob_start();
        require_once('partials/main-menu.php');
        return ob_get_clean();
    }
        
    // main menu filter.
    echo apply_filters('sanil_header_main_menu', sanil_header_main_menu());
    ?>
</div><!-- main-menu-wrapper -->

```

### sanil\_sidemenu\_contents

```php
<div id="mobile-menu-container">
    <div class="wrapper">
    	<?php
        function get_sidemenu_contents($logo) {
            ob_start();
            require_once('partials/sidebar-menu.php');
            return ob_get_clean();
        }
        echo apply_filters('sanil_sidemenu_contents', get_sidemenu_contents($logo), $logo);
	?>
    </div><!-- wrapper -->
</div><!-- mobile-menu-container -->
```

### sanil\_header\_search\_form

```php
<div class="header-search-form">
	<?php
	function sanil_header_search_form() {
		ob_start();
		require_once('partials/header-search-form.php');
		return ob_get_clean();
	}

	echo apply_filters('sanil_header_search_form', sanil_header_search_form());
	?>
</div>
```

### sanil\_header\_sidebar

This filter will be triggered inside header-contents.php on the right side of the logo.&#x20;

```php
apply_filters('sanil_header_sidebar', '');
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pbfnw-template.sanil.com.np/hooks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
