WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven theme - add text below search box (5 posts)

  1. magda711
    Member
    Posted 1 year ago #

    Hi!

    I want to add the phone number of my business just below the search box that appears on every page. How do I do that?

    I'm using theme twenty eleven and the site I'm talking about is remodelhome.us.

    Thanks for your help!

  2. theotherlebowski
    Member
    Posted 1 year ago #

    first things first, make a child theme before you do this!

    when you've done this open header.php and edit

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

    and just add the phone number under

    <?php get_search_form(); ?>

    you may have to tweak some css to get it in place/size and colour...

  3. Just to expand on that a little bit. ;)

    Read up on child theme's here.

    http://codex.wordpress.org/Child_Themes

    Once you've got the child theme created and activated inthemes/twentyeleven-child copy the parent theme header.php file into the child theme directory. Then make that modification that theotherlebowski mentioned above.

    Or if that's too much effort, create a header jpg image and just put the phone number as part of the header background image...

  4. magda711
    Member
    Posted 1 year ago #

    Thanks for your help guys but it didn't work :(. I did exactly what you instructed and the phone number doesn't appear anywhere...

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    You could add it in through your Child Theme header.php file, possibly in a wrapping paragraph?

    Maybe next to this

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

    So it's something like

    <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">
    <?php get_search_form(); ?>
    </div>
    <p class="telephone">077 777 7777</p>

    You can then style it with CSS to your needs.

Topic Closed

This topic has been closed to new replies.

About this Topic