Support » Plugin: Highlight Search Terms » Not working on second search

  • Hello,

    after successful integration of this highlight search terms plugin through this post https://wordpress.org/support/topic/doesnt-work-with-search-filter-plugin/, I have a simple other problem.
    On startpage I can set search term in searchbox and I got highlighted results.
    But If I search again with another search term I got results but NOT highlighted.

    Here is code from plugin (hlst.php):

    private static function have_search_terms() {
    		// did we not look for search terms before?
    		if ( !isset( self::$search_terms )) {
    			// try regular parsed WP search terms
    			if ( $searches = get_query_var( 'search_terms', false ) )
    				self::$search_terms = self::sanitize_terms( $searches );
    			// try for bbPress search or click-through from WP search results page
    			elseif ( $search = get_query_var( 'bbp_search', false ) OR ( isset($_GET['_sf_s']) AND $search = $_GET['_sf_s'] ) )
    				self::$search_terms = self::split_search_terms( $search );
    			// nothing? then just leave empty array
    			else
    				self::$search_terms = array();
    		}
    
    		return empty( self::$search_terms ) ? false : true;
    	}

    After first search I got ../suche/?_sf_s=test in address line.
    After second search I got ../suche?_sf_s=test in address line.
    There is a “/” missing after “suche” and before “?”.
    Could this be the problem?

    It would be great if someone can help me!
    Thanks and best regards!

    • This topic was modified 9 months, 1 week ago by dwauer.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Not working on second search’ is closed to new replies.