WordPress.org

Ready to get started?Download WordPress

Forums

Footer PHP and Search bar help (3 posts)

  1. sa_designer
    Member
    Posted 2 years ago #

    Hi guru's,

    Please can you help me with my child theme of twenty eleven. My client wants the search bar in the footer and not the header. I'm struggling big time trying to get the code to work in the footer. The code I stripped out of the header was this:

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

    [Please post code snippets between backticks or use the code button.]

    Please can someone tell me how to change it for the footer. I would really happy! Been struggling with this for a few days now. I am not an PHP expert I know my CSS but that's about it.

    All the best
    Sarah

  2. FittingSites
    Member
    Posted 2 years ago #

    It would probably be easier to add a widget area to the footer instead. That way you can easily use the widget area of the dashboard to add a search widget (or any widget you like) to the new footer widget area you created.

    The answer to this topic should point you in the right direction.
    A Google search for "how to add widgets to wordpress" will return even more info.

    Hope that helps,
    Jerry

  3. sa_designer
    Member
    Posted 2 years ago #

    Hi FittingSites,

    Thanks for the advice, I'll look into it. Tried the link option and Twenty Eleven is a bit of nightmare adding extra widgets and this didn't work for me. If anyone else has done this for Twenty Eleven child theme then please get intouch.

    Cheers
    Sarah

Topic Closed

This topic has been closed to new replies.

About this Topic