• Hi, I’m using the Redbel theme. My website is https://granthestonfitness.com/blo. I have a custom header. I’d like to remove search button from the header. A few people have told me options so far that I haven’t been able to make work. I am pasting the code from my header.php here. Can someone please tell me what I need to remove from the code to make the search button go away? Thanks in advance.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html <?php language_attributes(); ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
    <title><?php wp_title( '?', true, 'right' );?><?php bloginfo( 'name' ); ?></title>
    <link rel="shortcut icon" type="image/ico" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" />
    <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" media="all" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <script type="text/javascript" src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.min.js"></script>
    <!--[if lte IE 8]>
    <style type="text/css">/* Styles globaux */
    #comments li, #comments input.text, #comments textarea, #comments .input-text {behavior:url(<?php bloginfo('stylesheet_directory'); ?>/js/border-radius.htc);}
    {behavior:url(<?php bloginfo('stylesheet_directory'); ?>/js/border-radius.htc);}
    </style>
    <![endif]-->
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head();?>
    
    </head>
    <body <?php body_class(); ?>>
    <div class="website-container">
    	<div id="header">
    		<form action="<?php echo home_url( '/' ); ?>">
    			<div class="search-form">
    				<label class="search-label-sliding" for="search-sliding"><?php _e('Search','redbel');?></label>
    				<input name="s" id="search-sliding" class="search-sliding" type="text" value="" />
    				<input type="image" name="Search" src="<?php bloginfo('stylesheet_directory'); ?>/images/transparent.gif" alt="Search" class="search-button" />
    			</div>
    		</form>
    		<h1 class="blog-title"><a>"><?php bloginfo( 'name' ); ?></a></h1>
    		<div id="site-description"><?php bloginfo( 'description' ); ?></div>
    			<?php
    	$defaults_menu_par = array(
    	  'depth'           => 3,
    	  'theme_location'  => 'primary');
    	wp_nav_menu( $defaults_menu_par ); ?>
    	</div>

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s this section:

    <form action="<?php echo home_url( '/' ); ?>">
    			<div class="search-form">
    				<label class="search-label-sliding" for="search-sliding"><?php _e('Search','redbel');?></label>
    				<input name="s" id="search-sliding" class="search-sliding" type="text" value="" />
    				<input type="image" name="Search" src="<?php bloginfo('stylesheet_directory'); ?>/images/transparent.gif" alt="Search" class="search-button" />
    			</div>
    		</form>

    The button is the one that says class="search-button"

    Also? Don’t bump your posts please. It’s against forum guidelines.

    Thread Starter grantheston

    (@grantheston)

    Sorry about that. Didn’t know it was against the rules. So I just remove the line <div class=”search-form”> to remove the button?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    No, keep the div.

    Do you want to totally remove the search or JUST the button?

    Thread Starter grantheston

    (@grantheston)

    I guess just the button. I just don’t like the way it makes the blocks the logo in the header.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Try JUST removing this one line:

    <input type="image" name="Search" src="<?php bloginfo('stylesheet_directory'); ?>/images/transparent.gif" alt="Search" class="search-button" />

    Thread Starter grantheston

    (@grantheston)

    Okay, that removed the “go” button, but I still have the clear bubble that you type the search terms in. What should I alter to remove that?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You know when I asked “Do you want to totally remove the search or JUST the button?”

    That was how to remove the button.

    Remove the WHOLE form if you don’t want search at all.

    Thread Starter grantheston

    (@grantheston)

    Thanks for your help! Any chance you know how to fix my other issue regarding the social media links?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search button in header’ is closed to new replies.