• Resolved neileor

    (@roelientimmer)


    Thanks for solving my previous question.

    I activated Relevanssi, but instead of getting a code snippet as a result I get the full page.

    I know that this has to do with the settings of my theme Scratchpad.

    What should I change in the Scratchpad search.php or content.php to show the snippets as defined by Relevanssi?

    Thank you.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    In the template-parts/content-single.php there’s this:

    the_content( sprintf(
    	/* translators: %s: Name of current post. */
    	wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'scratchpad' ), array( 'span' => array( 'class' => array() ) ) ),
    	the_title( '<span class="screen-reader-text">"', '"</span>', false )
    ) );

    This prints out the full post content.

    Something like this should fix this:

    if ( is_search() ) {
    	the_excerpt();
    } else {
    	the_content( sprintf(
    		/* translators: %s: Name of current post. */
    		wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'scratchpad' ), array( 'span' => array( 'class' => array() ) ) ),
    		the_title( '<span class="screen-reader-text">"', '"</span>', false )
    	) );
    }
    Thread Starter neileor

    (@roelientimmer)

    Nevermind, found the solution. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Relevanssi with Scratchpad Theme’ is closed to new replies.