Support » Fixing WordPress » displaying full post in search results

  • i am trying to get the full blog posts to show up in the search results page and also when you view the posts by category.

    Right now, it only shows the title and the first few lines of text. i’d like it to show the image and also a text field i have in each post as well. my posts are short, so showing the full post won’t make the results/categeory pages too lengthy.

    can anyone help? I’m looking for the code. Also, I can’t even tell which php page i need to add it to..

    thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have a look at Template_Hierarchy and see what pages are used for search results.

    If you don’t have a search.php in your current theme, you may wish to create one.

    If you have one but it is using the_excerpt() in The_Loop, you might change that to use the_content() instead.

    Thread Starter orangeena


    I do have a search.php file. i’ve been going through it and found this code that may be causing this:

    <div class="entry">
    <?php the_excerpt() ?>
    <p><a href="<?php the_permalink() ?>#more-<?php the_ID(); ?>" title="Read the rest of this entry">[Read more &rarr;]</a></p>

    i don’t know what to change it to, though. any suggestions?

    Thread Starter orangeena


    i just figured out how to fix my search results.

    i still can not get it set correctly when viewing by category.

    i still can not get it set correctly when viewing by category.

    its done the same way, by using a custom category.php

    would you mind sharing how you figured out how to fix the search results? I changed my search.php file to the_content, however while the full post now shows up, there are duplicates of each post and they are not displayed in the formatted way, they are all over the place.
    Any insights?!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘displaying full post in search results’ is closed to new replies.