-
AuthorPosts
-
June 10, 2021 at 3:04 pm #1305089
Hi there!
We’ve already got a solution for this issue by editing line 408 in functions-enfold.php:
https://kriesi.at/support/topic/ajax-search-html-tag-in-excerpt/
In order to prepare Enfold for an easy udating it would be better to use an add_filter solution. Ismael has already proposed one in post #335930, but it doesn’t work.
Do you have an idea?
Thanks
BerndJune 14, 2021 at 7:04 am #1305528Hey profil77,
Thank you for the inquiry.
The filter in the previous thread should allow br tags in the excerpt. If you want to allow both versions of the br tags, the one that is self-closing and the other version, try to replace the filter with this one.
If this is not working, please provide the link to the search results page so that we can check it further.
Best regards,
IsmaelJuly 14, 2021 at 11:09 am #1310094Hi Ismael.
Thanks and sorry for the late reply.
As soon as we use the filter, the excerpt content disappears completely from the ajax search results. Maybe you can rebuilt this issue?
Best regards
BerndJuly 19, 2021 at 5:36 am #1310673Hello Bernd!
Thank you for the update.
The filter should have not removed the excerpt completely. Did you remove or disable the previous filter before adding this one? Please post the site details in the private field including an admin account so that we could check the issue properly.
Best regards,
IsmaelJuly 19, 2021 at 11:09 am #1310703Hi Ismael! Ok, you can try it by using the following site details.
Best regards
BerndJuly 20, 2021 at 5:42 am #1310815Hi,
Thank you for the info.
It seems to be working just fine. The excerpt still displays in the search result page with the br tags intact. Please check the screenshot below.
Screenshot: https://imgur.com/iwMRl1M
Best regards,
IsmaelJuly 20, 2021 at 2:26 pm #1310886Hi Ismael.
Oh, this is a misunderstanding. We mean the search results in the live preview of the Ajax search. Sorry for not being clear enough.
Best regards
BerndJuly 22, 2021 at 7:38 am #1311354Hi,
It works fine in the AJAX preview as well. Please check the screenshot below.
Screenshot: https://postimg.cc/fJ9bVQgz
Best regards,
IsmaelJuly 22, 2021 at 9:28 am #1311393That’s right, Ismael. This is the condition as we described it in post #1310703. It’s the state due to the correction of functions-enfold.php. As soon as we use the filter instead, the excerpt is no longer displayed.
Best regards
BerndJuly 23, 2021 at 7:44 am #1311742Hi,
Thank you for the info.
We have found a minor syntax error in the filter, so we adjusted it. We also reverted the changes in the functions-enfold.php file. It should be working properly now.
Best regards,
IsmaelJuly 25, 2021 at 7:40 am #1312173Hi Ismael.
Sorry, it doesn’t work yet. We can see the the reverted changes in functions-enfold.php, but we can’t find the filter.
Best regards
BerndJuly 28, 2021 at 7:49 am #1312945Hi,
Sorry about that. We had to modify the functions-enfold.php file and add the $post as one of the parameters of the avf_ajax_search_excerpt filter to make the original or unmodified excerpt available.
$excerpt = apply_filters( 'avf_ajax_search_excerpt', avia_backend_truncate($post->post_excerpt,70," ","...", true, '', true), $post );
The filter or the function avf_ajax_search_excerpt_allow is now working as it should. We will forward the issue to our channel.
Best regards,
IsmaelJuly 28, 2021 at 9:34 am #1312976Thanks Isamael, great, it’s working fine now.
We can expect the problem to be fixed with the next update?
Best regards,
BerndJuly 31, 2021 at 7:32 am #1313545 -
AuthorPosts
- The topic ‘HTML-Tag in Excerpt’ is closed to new replies.