• Hi, I created a results page (search.php) including the search results by post, page and type of custom post. I’m using the Divi theme. I can see correctly the excerpts for post and cpt.I see excerpt for pages created with Divi Builder BUT NOT for pages created without the builder. Any suggestions? Thank you

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

    (@msaari)

    That’s a well-known Divi issue. See instructions here.

    Thread Starter kaliraw

    (@kaliraw)

    Thanks, I had already found this guide of yours before you brought the question but it hadn’t solved the problem for me.

    Moreover I understand that this filter removes the shortcodes generated by the page composer but, on the page in question, I haven’t activated any composer.
    The curious thing is:

    – if I completely clean up the text by adding only the word “test” with no html code, the summary is displayed;
    – if I put back the text I had originally instead I don’t see any summary;

    In function.pho I entered this code first:

    add_filter(‘relevanssi_pre_excerpt_content’, ‘rlv_trim_divi_shortcodes’);
    function rlv_trim_divi_shortcodes($content) {
    $content = preg_replace(‘/\[\/?et_pb.*?\]/’, ”, $content);
    return $content;
    }

    Not working I tried this:

    add_filter(‘relevanssi_pre_excerpt_content’, ‘rlv_shortcode_blaster’);
    function rlv_shortcode_blaster($content) {
    $content = preg_replace(‘/\[.*?\]/s’, ”, $content);
    return $content;
    }

    thank you so much for replies

    Plugin Author Mikko Saari

    (@msaari)

    I was talking about the first part –?the one about Divi not showing Relevanssi excerpts in the first place. Have you fixed that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page excerpt in result page don’t work’ is closed to new replies.