Title: Where do I paste the PHP Code in my theme?
Last modified: August 21, 2016

---

# Where do I paste the PHP Code in my theme?

 *  Resolved [jchambo](https://wordpress.org/support/users/jchambo/)
 * (@jchambo)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/where-do-i-paste-the-php-code-in-my-theme/)
 * Greetings,
 * I’m looking to find out where I’m supposed to insert the PHP code into my theme
   and what file?
 * Code:
    `<?php echo do_shortcode( '[searchandfilter taxonomies="category,post_tag"]');?
   >`
 * I am using the KnowHow theme and it has search.php and searchform.php files. 
   I’m assuming the searchform.php file, and also, my search bar looks like this:
 * [http://jchambo.com/wp-content/uploads/2014/03/searchbar.jpg](http://jchambo.com/wp-content/uploads/2014/03/searchbar.jpg)
 * Would I be able to modify it to put just a drop down to search within a category?
 * Thanks,
    John
 * [https://wordpress.org/plugins/search-filter/](https://wordpress.org/plugins/search-filter/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * (@designsandcode)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/where-do-i-paste-the-php-code-in-my-theme/#post-4684448)
 * Hi jchambo
 * This plugin generates a complete search form, and won’t integrate in conjuction
   with another search form – you can have them both on the same page, but this 
   plugin will not add fields or dropdowns to your existing search form.
 * What you need to do is locate exactly where in your theme this search bar is 
   being generated, and then replace it with the code you have above – as a complete
   guess, this may be in your `header.php`, or your theme may use the `searchform.
   php`.
 * Sorry I can’t be more specific about the location of your current search bar 
   but it could be anywhere!
 * After you have done that you will be using the search form from the plugin instead,
   however, I guess that it may not be styled the exact way you want it, so you’ll
   have to use some CSS to get this plugin looking exactly the way you want.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Where do I paste the PHP Code in my theme?’ is closed to new replies.

 * ![](https://ps.w.org/search-filter/assets/icon-256x256.png?rev=3096093)
 * [Search & Filter](https://wordpress.org/plugins/search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-filter/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Ross Morsali](https://wordpress.org/support/users/designsandcode/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/where-do-i-paste-the-php-code-in-my-theme/#post-4684448)
 * Status: resolved