Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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.

    #1340805

    Update on dev website

    #1340869

    Hi,

    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,
    Ismael

    #1341002

    Hi,

    I did not modify the search template at all.

    #1341194

    Hi 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,
    Nikko

    #1341245

    Ahhh 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.

    #1341260

    Hi 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.