-
AuthorPosts
-
February 16, 2022 at 12:08 am #1340803
hi, so with my install here when I do a search some of the result come back with the builder shortcodes showing?
Go Here and in the top search put in prd and view all results, you will see the issues im running into.
February 16, 2022 at 12:26 am #1340805Update on dev website
- This reply was modified 2 years, 9 months ago by acscreativenew.
February 16, 2022 at 8:46 am #1340869Hi,
Thank you for the inquiry.
Looks like it is rendering the custom css styles of the elements in the page. Did you add any modifications to the search template? Please post the login details in the private field so that we can check the issue further.
Best regards,
IsmaelFebruary 17, 2022 at 12:20 am #1341002Hi,
I did not modify the search template at all.
February 17, 2022 at 4:47 pm #1341194Hi acscreativenew,
Thanks for giving us admin access.
This code in your child theme’s functions.php file is causing the issue:function improved_trim_excerpt($text) { global $post; if ( '' == $text ) { $text = get_the_content(''); $text = apply_filters('the_content', $text); $text = str_replace('\]\]\>', ']]>', $text); $text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text); $text = strip_tags($text, '<p><br><b><a><em><strong>'); $excerpt_length = 80; $words = explode(' ', $text, $excerpt_length + 1); if (count($words)> $excerpt_length) { array_pop($words); array_push($words, '[...]'); $text = implode(' ', $words); } } return $text; } remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'improved_trim_excerpt');
I have commented the code and it seems to have fixed the issue, please review the site.
Best regards,
NikkoFebruary 18, 2022 at 1:03 am #1341245Ahhh thanks so much for finding this. Do you happen to know another script i can use to allow html in excerpts? That is what that code did.
February 18, 2022 at 4:58 am #1341260Hi acscreativenew,
I think the issue is the get_the_content since it fetches shortcodes as well, try using get_the_excerpt function though you will need to add content in the excerpt field.
Hope this helps.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.