Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #334772

    Hi,
    I have an <br /> tag in eyery excerpt of the portfolio items.
    The Ajax search seems to remove this tag, so the content of the first and second line is displayed not separated.
    Do you have any idea?
    Best regards, Bernd

    #335383

    Hi profil77!

    Thank you for using Enfold.

    Can you please give us a link to the actual page? A screenshot of the issue will help.

    Regards,
    Ismael

    #335417
    This reply has been marked as private.
    #335930

    Hey!

    Thank you for the info.

    Please add this on functions.php:

    add_filter( 'avf_ajax_search_excerpt', 'avf_ajax_search_excerpt_allow', 1);
    
    function avf_ajax_search_excerpt_allow($excerpt) {
    	$excerpt = avia_backend_truncate($post->post_excerpt,70," ","...", true, '<br/>', true);
    	return $excerpt;
    }

    Regards,
    Ismael

    #335955

    Thanks Ismael.
    Sorry. For the moment, the ajax search shows no excerpt.
    I’ve already tried it with <br/> and <br />
    Best regards, Bernd

    #338215

    Hi Ismael,
    are there any news about this issue?
    Regards, Bernd

    #339700

    Hi Bernd!

    I think you’ll need to edit the file itself, open /enfold/functions-enfold.php and look for line 173:

    $excerpt =  apply_filters( 'avf_ajax_search_excerpt', avia_backend_truncate($post->post_excerpt,70," ","...", true, '', true) );
    

    Replace it by this:

    $excerpt =  apply_filters( 'avf_ajax_search_excerpt', avia_backend_truncate($post->post_excerpt,70," ","...", true, '<br>', true) );
    

    Then add this to Quick CSS:

    #top #searchform br {
        display: block;
    }

    Best regards,
    Josue

    #340314

    Hi Josue,
    yeah, that works fine. Great.
    Thanks a lot, Bernd

    #340338

    You are welcome Bernd, glad to help :)

    Regards,
    Josue

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Ajax Search: HTML-Tag in excerpt’ is closed to new replies.