Title: Search box
Last modified: December 17, 2018

---

# Search box

 *  [rosudel](https://wordpress.org/support/users/rosudel/)
 * (@rosudel)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/search-box-65/)
 * I want to use the search box in the header section. How to do that,please…

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kharis Sulistiyono](https://wordpress.org/support/users/kharisblank/)
 * (@kharisblank)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/search-box-65/#post-11000690)
 * Hello there,
 * Firstly add this PHP snippet to your child theme’s functions. Or use a plugin
   that allows the same purpose like [Functionality](https://wordpress.org/plugins/functionality/).
 *     ```
       add_filter( 'wp_nav_menu_items', 'astrid_child_add_top_search_menu', 10, 2 );
       function astrid_child_add_top_search_menu( $items, $args ) {
           if ($args->theme_location == 'primary') {
               $items .= '<li class="top-search-menu">'.get_search_form(false).'</li>';
           }
           return $items;
       }
       ```
   
 * Then add the below CSS code to Appearance > Customize > Additional CSS from dashboard.
 *     ```
       .top-search-menu .search-submit{
         display: none;
       }
   
       .top-search-menu label{
         position: relative;
       }
   
       .top-search-menu label:before{
         font-family: FontAwesome;
         content: '\f002';
         display: inline-block;
         display: block;
         width: 26px;
         height: 26px;
         position: absolute;
         top: -4px;
         left: 0;
         padding: 0 5px;
       }
   
       .top-search-menu .search-field{
         height: 26px;
         padding: 3px 5px 3px 23px;
         font-weight: normal;
       }
       ```
   
 * Regards,
    Kharis
 *  Thread Starter [rosudel](https://wordpress.org/support/users/rosudel/)
 * (@rosudel)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/search-box-65/#post-11001475)
 * thnaks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Search box’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astrid/1.20/screenshot.png)
 * Astrid
 * [Support Threads](https://wordpress.org/support/theme/astrid/)
 * [Active Topics](https://wordpress.org/support/theme/astrid/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astrid/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astrid/reviews/)

## Tags

 * [search box](https://wordpress.org/support/topic-tag/search-box/)

 * 2 replies
 * 2 participants
 * Last reply from: [rosudel](https://wordpress.org/support/users/rosudel/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/search-box-65/#post-11001475)
 * Status: not resolved