Twenty Eleven
How Do I Replace Search Bar with Text ? (4 posts)

  1. twowolves73
    Posted 3 years ago #


    I have researched this topic thoroughly before posting here, and there are many related topics, but nothing specific to my query.

    Is it possible to edit the .css in the stylesheet for this theme (or searchform.php), to delete the search bar above the header section, and replace it with text? I would like to place a phone number in this area of the template.

    I am using a child theme to make alterations to the theme, but for the purposes of this post, I have reactivated the parent theme for you to view here http://www.twowolves.com.au

    I am still learning, so please ask me to clarify if my request is confusing.

    Thank you for your time in advance.

  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    but for the purposes of this post, I have reactivated the parent theme for you to view here

    keep the child theme activated.

    look into header.php for the code of the searchbar, edit it there.

  3. twowolves73
    Posted 3 years ago #

    Thanks alchymyth for your response. I will reactivate the child theme and look for code to edit in header.php.

    I may come back to ask more questions, but wish me luck!


  4. twowolves73
    Posted 3 years ago #

    Okay, please bear with me and I apologise if I appear completely lazy (even if I have researched myself stupid), but I am still quite new to PHP and would really appreciate any help.
    Following the advice of alchymyth in the response above, I do believe I have found the code for the search bar in header.php shown here at line 119 to 126:

    <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
    				<?php get_search_form(); ?>
    				else :
    				<?php get_search_form(); ?>
    			<?php endif; ?>

    The question is, what exactly do I edit? Do I remove the search bar code entirely and replace it with new script or just modify certain parts of the script?
    This is the script that I came up with:

    echo "business phone number";

    But this does not tell the browser where to actually place this in the header.
    I am also wondering if I need to place the finalised script in to the style.css sheet to make it 'look' right (fonts, font size, alignment and so forth).

    Thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic