• 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    Thread Starter sa_designer

    (@sa_designer)

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Footer PHP and Search bar help’ is closed to new replies.