Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #422906

    Hi,

    Ajax search result preview is showing shortcode. http://imgur.com/RnHANNN
    Is this a bug?

    #422925

    Hey senso!

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Best regards,
    Rikard

    #423356

    Hi Rikard,

    It is offline. Is there anyway I can troubleshoot it?

    #423784

    Hi!

    Add this to the functions.php file to strip all shortcodes in the ajax search excerpt:

    add_filter('avf_ajax_search_excerpt', 'avf_ajax_search_excerpt_mod', 10);
    function avf_ajax_search_excerpt_mod($excerpt) {
    	preg_match_all("^\[(.*?)\]^", $excerpt, $matches, PREG_PATTERN_ORDER);
    	$excerpt = str_replace($matches[0], '', $excerpt);
    	return $excerpt;
    }

    Or hide the ajax search excerpt with this on Quick CSS field:

    span.ajax_search_excerpt { display: none !important; }
    

    Cheers!
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Search results preview showing shortcode’ is closed to new replies.