Support » Theme: Coraline » List style search results

  • Resolved ElPapay

    (@elpapay)


    How do I create a “List Style” search results. I only want the title of the post and the date posted without the excerpts. Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    The excerpt on the search results page is generated through the loop.php template:

    <?php if ( is_search() ) : // Display excerpts for search. ?>
        <div class="entry-summary">
            <?php the_excerpt(); ?>
        </div><!-- .entry-summary -->
    <?php else : ?>

    To hide the excerpt, create a child theme, put a copy of loop.php in it, and remove the lines I quoted above.

    In the space where you removed these lines, add this new code instead:

    <?php if ( ! is_search() ) : // Display post only if not search results ?>

    More about is_search: http://codex.wordpress.org/Function_Reference/is_search

    Here are some guides to child theming in case you haven’t made one before:

    http://codex.wordpress.org/Child_Themes
    http://op111.net/53/

    Thanks Kathryn, i’ll try this one out shortly 🙂

    This didn’t work for me.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    ssergutaboselaw – could you please start a thread and provide a link to your site so folks can take a look? Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘List style search results’ is closed to new replies.