WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make the search box background the same as the homepage, but for some reason there is a orange background - it doesn't use a different header.php its called within a filter the code below.

add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2);
function add_search_box_to_menu( $items, $args ) {
    if( $args->theme_location == 'main nav' )
        return $items."<li class='custom-search custom-search-gradient menu-item'><a href=\"javascript:void(0)\"><i class=\"icon-search\"></i>".__('Search', 'concept7')."</a><div class=\"menu-search-form\"><form style=\"overflow:hidden;text-align:center;\" method=\"get\" id=\"searchbar\" action=" .home_url()."/ >
                <input type=\"text\" class=\"menu-search-form-input\" name=\"s\" id=\"search\" value=\"Type and hit enter ...\"/>

    return $items;

This is the code that generates the search box, however I can't see anything in this that changes the background colour or a condition to say if its a certain page template change the background or div element.

Here is a link to the website, my desired result is to get the navigation to look the same as the homepage on all other pages - basically remove the orange background.

Many Thanks in advance.

share|improve this question
You have CSS classes that take precedence in sub pages and makes the background orange. Its neither a PHP problem nor a WordPress. – M-R Jul 29 '13 at 16:01
up vote 0 down vote accepted

Line 500 of your style.css reads:

.page-template-template-white-rev-php .custom-search .menu-search-form{

Just remove the background line here to fix it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.