Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 ...\"/>
                </form></div></li>";

    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.

http://79.170.44.128/new-getextra.co.uk/

Many Thanks in advance.

share|improve this question
2  
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
add comment

1 Answer

up vote 0 down vote accepted

Line 500 of your style.css reads:

.page-template-template-white-rev-php .custom-search .menu-search-form{
    background:#eef4f9;
    -moz-box-shadow:none;
    -webkit-box-shadow:none;
    box-shadow:none;
}

Just remove the background line here to fix it.

share|improve this answer
add comment

Your Answer

 
discard

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.