• Currently I am using the Search Everything plugin, and when I search for a keyword, the search results will display the whole page which contains that keyword. Is it possible to provide summaries of the search results with a read more link?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • yes, on your search.php file, replace <?php the_content(); ?> with <?php the_excerpt(); ?>

    Thread Starter shelikesrain

    (@shelikesrain)

    I have a problem, the current theme I am using doesn’t have a search.php file. How do I create the page and what needs to be in it?

    The current search form in the sidebar looks like this:

    \<h1>Search Box</h1>
    <form action=”<?php bloginfo(‘url’); ?>” method=”get” class=”searchform”>
    <p>
    <input name=”s” class=”textbox” type=”text” />
    <input name=”search” class=”button” value=”Search” type=”submit” />
    </p>
    </form> \

    Yeah, that’s the “searhform.php” file. If you don’t have a search.php file (which shows the results) you can easily make one. Look at the “default” theme, and you’ll see what needs to be in there. But basically, you can just copy your index.php file and replace “the_content” with “the_excerpt” and name the copy as “search.php” and you’re good to go.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search summaries instead of full pages’ is closed to new replies.