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
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
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
Thanks Ismael.
Sorry. For the moment, the ajax search shows no excerpt.
I’ve already tried it with <br/>
and <br />
Best regards, Bernd
Hi Ismael,
are there any news about this issue?
Regards, Bernd
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
Hi Josue,
yeah, that works fine. Great.
Thanks a lot, Bernd
You are welcome Bernd, glad to help :)
Regards,
Josue