• Resolved Robert

    (@robbieb1953)


    I was trying to modify the search box position on the main page of twenty eleven and I mistakenly took out some code – now the search feature does not work.

    I need the original code for this section – below is what I have, but I must have made an error when I tried to rebuild it:

    `* The template for displaying Search Results pages.
    *
    * @package WordPress
    * @subpackage Twenty_Eleven
    * @since Twenty Eleven 1.0
    */

    get_header(); ?>

    <section id=”primary”>
    <div id=”content” role=”main”>

    <?php if ( have_posts() ) : ?>

    <header class=”page-header”><h1 class=”page-title”><?php printf( _( ‘Search Results for: %s’,
    ‘twentyeleven’ ), ‘span> . get_search_query() . ‘<span>’ ); ?> </h1>
    </header>

    <?php twentyeleven_content_nav( ‘nav-above’ ); ?>

    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>`

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Wow! You took out quite a bit of code on that. I can tell you are missing a single quote and a backslash within the header tags but it could also be the parser. Please, next time you want to display more than ten lines of code use pastebin.com or similar. 🙂

    I would suggest you get a fresh copy of the theme and upload the search.php file.

    This is actually one of the few reasons why it’s best to use a child theme when it comes to editing a theme. Especially a bundled theme.

    Thread Starter Robert

    (@robbieb1953)

    ok, fewer lines of code, looking at child theme now. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Search box function not working’ is closed to new replies.