• Better Search highlights past search results page. If I enable “Highlight search terms”, it adds the following to the page itself, not just the results page. This causes words on the actual post or page highlighted all over the place. It also causes pages with my yourchannel plugin to not work. However, disabling the highlight feature fixed the shortcode issue and highlighting post and page issues. How do I make it so that the following doesn’t show up on individual posts and pages after clicking on them from the results page> This is what I am referring to at the end of the url. For example…
    /?bsearch_highlight=faith

    I have the highlight feature disabled until this is fixed.

    The page I need help with: [log in to see the link]

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

    (@ajay)

    @dailycdev

    Please can you try this in your functions.php

    
    remove_filter( 'post_link', 'bsearch_post_link' );
    remove_filter( 'post_type_link', 'bsearch_post_link' );
    remove_filter( 'page_link', 'bsearch_post_link' );
    remove_filter( 'attachment_link', 'bsearch_post_link' );
    
    Thread Starter dailycdev

    (@dailycdev)

    I did that and got the following error when I added that to snippets in wordpress…

    Don't Panic
    The code snippet you are trying to save produced a fatal error on line 1:
    
    syntax error, unexpected '&'
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
    
    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    However, trying again, it finally added and seemed to have fixed this.
    However, I was wondering if this will be fixed in the plugin itself so that I can remove this snippet?

    Plugin Author Ajay

    (@ajay)

    I think it might be cause of Code Snippets (which I assume you’re using?)

    I plan to add a new checkbox in the settings page that allows a user to turn off/on the setting. But, this will come in v3.1.0 which is a while away.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Better Search highlights past search results page’ is closed to new replies.