• Resolved ptaxi

    (@ptaxi)


    I am trying to modify a search.php (from Twentyten theme)page for my custom theme.

    So far, when I run a search, all that displays is header saying “Search Results For:xx”. But there are no actual search results.

    Can someone be more specific with regards to what changes I have to make to the search.php file in order to customize for my theme?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Start again using the search.php template file from TwentyTen “as is”. Ensure that you have a loop.php or loop-search.php file in your theme.

    Thread Starter ptaxi

    (@ptaxi)

    Still no go..

    Could the problem be something to do with the fact that my search button (and form) in in my header.php, and I have NO sidebar.php?

    No – that shouldn’t matter. It sounds like you’re missing the Loop. What version of WordPress are you using?

    Thread Starter ptaxi

    (@ptaxi)

    I apologize. I did not read you previous post carefully- I did not have a loop.php file in my theme.

    Now after copying this file from Twentyten to my theme, the search works better, but still displays this error:

    Fatal error: Call to undefined function twentyten_posted_on() in C:\xampplite\htdocs\wordpress\wp-content\themes\wp2\loop.php on line 129

    When I check in the file, and delete the div at line 129 (which is as follows), it seems to work OK.

    <div class=”entry-meta”>
    <?php twentyten_posted_on(); ?>
    </div><!– .entry-meta –>

    Can you tell me what this div does exactly?

    It outputs the post’s date, author etc.

    Thread Starter ptaxi

    (@ptaxi)

    Thank you for your help… For now I will exclude:

    <div class=”entry-meta”>
    <?php twentyten_posted_on(); ?>
    </div><!– .entry-meta –>

    from my theme…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to modify seacrh.php for custom theme’ is closed to new replies.