• Hi,

    I am having issues with my search results page.
    The results show up as the full page or article, taking up tons of space and making my search results page ugly.

    I would like the search results to show an excerpt from the page.

    I have installed Relevannsi and Live Search plugins in hopes they would have a setting for the search results page.

    Is there something i need to change in CSS? there is very little code.
    this is under search.php

    <?php
    /**
    * @package Gantry 5 Theme
    * @author RocketTheme https://www.rockettheme.com
    * @copyright Copyright (C) 2007 – 2018 RocketTheme, LLC
    * @license GNU/GPLv2 and later
    *
    * https://www.gnu.org/licenses/gpl-2.0.html
    */

    defined(‘ABSPATH’) or die;

    /*
    * Search results page
    */

    $gantry = Gantry\Framework\Gantry::instance();
    $theme = $gantry[‘theme’];

    // We need to render contents of <head> before plugin content gets added.
    $context = Timber::get_context();
    $context[‘page_head’] = $theme->render(‘partials/page_head.html.twig’, $context);

    $context[‘title’] = __(‘Search results for:’, ‘g5_fluent’) . ‘ ‘ . get_search_query();
    $context[‘posts’] = Timber::get_posts();

    $templates = [‘search.html.twig’, ‘archive.html.twig’, ‘index.html.twig’];

    Timber::render($templates, $context);

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should ask in your theme’s support forum. It is usually a simple thing to change from the_content to the_excerpt, but it looks like your theme made it a bit more complicated.

    Thread Starter peter4

    (@peter4)

    Thats what ive noticed, awesome.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘search results are too long’ is closed to new replies.