# How to add search bar in header for Travelify WordPress theme?

**URL:** <https://colorlibsupport.com/t/how-to-add-search-bar-in-header-for-travelify-wordpress-theme/6833>\
**Category:** Travelify\
**Created:** [January 29, 2015, 9:29am UTC](https://colorlibsupport.com/t/how-to-add-search-bar-in-header-for-travelify-wordpress-theme/6833 "2015-01-29T09:29:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aigars-silkalns](https://colorlibsupport.com/user_avatar/colorlibsupport.com/aigars-silkalns/32/13469_2.png) [@aigars-silkalns](https://colorlibsupport.com/u/aigars-silkalns)\
**Post date:** [January 29, 2015, 9:31am UTC](https://colorlibsupport.com/t/how-to-add-search-bar-in-header-for-travelify-wordpress-theme/6833/2 "2015-01-29T09:31:34Z")

</div>

Search form can be added via Child Theme `functions.php` file. Sample Child Theme can be [downloaded from here](https://colorlibsupport.com/t/travelify-child-theme/).

First you need to add this code to Child Theme `functions.php` file

```auto
// Custom Search in header via Child Theme functions.php
add_action( 'travelify_header', 'my_custom_search' , 5 );

function my_custom_search() {
	get_search_form();
}

```

When you are done with that you will have to style this form and you can do by adding this Custom CSS to Theme Options - Other - Custom CSS or inside your Child Theme `style.css`

```auto
.searchform {
    height: 30px;
    z-index: 100;
    float: right;
    margin-top: 50px;
    margin-right: 20px;
    margin-left: 10px;
}

#branding input.s {
    border: 1px solid #D0D0D0;
    width: 120px;
    text-indent: 10px;
    padding-left: 10px;
}

```

Let me know if this helps.

---

_[View the full topic](https://colorlibsupport.com/t/how-to-add-search-bar-in-header-for-travelify-wordpress-theme/6833)._
