Title: Adding a search button/function to header
Last modified: October 2, 2016

---

# Adding a search button/function to header

 *  [lauralizard](https://wordpress.org/support/users/lauralizard/)
 * (@lauralizard)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/adding-a-search-buttonfunction-to-header/)
 * Hi,
 * I’m working an a recruitment website and the client wants a ‘search jobs’ button
   showing in the header of every page (I’ve attached an image as an example). The
   button will link to the jobs page which has the search functionality.
 * ![screen shot](https://i0.wp.com/www.tailoredrecruitmentconsultancy.co.uk/screen-
   shot.png)
 * Can anyone explain the best way to do this? I’d also need it to change to just
   the magnifying glass icon on responsive devices.
 * Thanks!

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

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/adding-a-search-buttonfunction-to-header/#post-8247975)
 * Hi there, you’ll need to first create a child theme, otherwise your tweaks will
   be overwritten every time you update the theme. Here are some guides in case 
   you haven’t made one before:
 * [http://codex.wordpress.org/Child_Themes](http://codex.wordpress.org/Child_Themes)
   
   [https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/](https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/)
 * – The file you’ll need to add the search-form function to in your child theme
   is `header.php`.
    – You’ll need to call in the search form in your child theme’s
   header, using a function. Here are a few references to help with your modification:
 * [https://developer.wordpress.org/reference/functions/get_search_form/](https://developer.wordpress.org/reference/functions/get_search_form/)
   
   [https://codex.wordpress.org/Styling_Theme_Forms](https://codex.wordpress.org/Styling_Theme_Forms)
 * This should point you in the right direction – good luck!
 *  Thread Starter [lauralizard](https://wordpress.org/support/users/lauralizard/)
 * (@lauralizard)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/adding-a-search-buttonfunction-to-header/#post-8264052)
 * Hi,
 * Thanks, I’ve got a child theme all set up so I’ll take a look at the other links
   and let you know how I get on!
 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/adding-a-search-buttonfunction-to-header/#post-8271838)
 * Great – good luck and let us know how it goes.

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

The topic ‘Adding a search button/function to header’ is closed to new replies.

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

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/adding-a-search-buttonfunction-to-header/#post-8271838)
 * Status: not resolved