• I have a temporary page with the better search enabled and the search results show surprising results. Example is below. In pages in WordPress, I find no option to add excerpt. Is there a way to have the search results exclude the code?

    Catholic Annulment
    Relevance: 3% Posted on: August 6, 2016

    [vc_row][vc_column css=”.vc_custom_1470515457998{margin-top: 16px !important;}”][vc_column_text]Annulment is the common name for a decree of invalidity of a marriage for Catholics. After an investigation by a Church tribunal, if it is proven that the parties’ original marriage promises were invalid, then the marraige itself is null. Because Mary’s Advocates works to reduce…

    https://wordpress.org/plugins/better-search/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    (@ajay)

    Are you using Seamless Mode or is this off?

    Looking at the relevance setting I think this might be off.

    In that case one setting worth trying in your themes’ functions.php file is:

    function remove_shortcode_from_bsearch( $content ) {
        $content = strip_shortcodes( $content );
      return $content;
    }
    add_filter( 'get_bsearch_excerpt', 'remove_shortcode_from_bsearch' );

    Hello

    I tried to add this to my functions.php file in my child theme but it still pulls through all the shortcodes, can you help with this?

    I also have seamless mode off as it only searched posts if enabled.

    Thanks

    Plugin Author Ajay

    (@ajay)

    Hi,

    I just relooked at the code and I realised that the shortcodes should be stripped when displaying the results.

    Can you show me your site?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If page is in search result, the code [vc_row][vc_col ..etc.’ is closed to new replies.