Title: Modifying search.php
Last modified: August 21, 2016

---

# Modifying search.php

 *  [draydesign](https://wordpress.org/support/users/draydesign/)
 * (@draydesign)
 * [13 years ago](https://wordpress.org/support/topic/modifying-searchphp/)
 * In my WordPress implementation, I have two sets of widgets, one of which is a
   custom menu. I use the basic WordPress parameters to include one widget on some
   of the pages and other widgets on other pages.
 * Specifically, this is a website for an art gallery, and a custom menu that contains
   the names of the artists appears as a widget on most pages. Some other pages 
   do not include the artist menu, but instead include text widgets with news items.
   The post page has a sidebar with recent posts, categories, etc.
 * When I include a search function, the results are shown with a sidebar that has
   the custom menu of artists. I would like search results to instead show widgets
   for recent posts, categories, etc.
 * I do not know PHP, but it seems that in search.php, the line
 * <?php get_sidebar(‘top’); ?>
 * is the one that gets the sidebar and that I could eliminate the sidebar altogether
   by deleting the line.
 * My question is what changes do I make to search.php to get the search results
   to display the set of widgets that appear on the post pages?
 * Thanks….Duane

The topic ‘Modifying search.php’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [draydesign](https://wordpress.org/support/users/draydesign/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/modifying-searchphp/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
