Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey,

    thanks for reaching out and for the blog link. I have checked out your site and tried searching for the tag “Sharpie” – and got a lot of results. Is there any specific tag search that doesn’t work for you?

    Looking forward to your reply,
    Petra

    And what about multiple tag search ?

    1 tag works fine but when using more than tag, it fails.

    I get the Unknown column 'tter.name' all the time too.

    Hey,

    to make it search for multiple tags, go to “Plugins”-> “Editor”-> in the right top corner select “Search Everything” and then select the “search-everything.php” file. There replace the “function se_build_search_tag()” function with this one:

    // create the search tag query
    	function se_build_search_tag() {
    		global $wpdb;
    		$vars = $this->query_instance->query_vars;
    
    		$s = $vars['s'];
    		$search_terms = $this->se_get_search_terms();
    		$exact = isset( $vars['exact'] ) ? $vars['exact'] : '';
    		$search = '';
    
    		if ( !empty( $search_terms ) ) {
    			// Building search query
    			$n = ( $exact ) ? '' : '%';
    			$searchand = '';
    			foreach ( $search_terms as $term ) {
    				$term = addslashes_gpc( $term );
    				if ( $this->wp_ver23 ) {
    					$search .= "{$searchand}(tter.name LIKE '{$n}{$term}{$n}')";
    				}
    				$searchand = ' OR ';
    			}
    			$sentence_term = esc_sql( $s );
    			if ( count( $search_terms ) > 1 && $search_terms[0] != $sentence_term ) {
    				if ( $this->wp_ver23 ) {
    					$search = "($search) OR (tter.name LIKE '{$n}{$sentence_term}{$n}')";
    				}
    			}
    			if ( !empty( $search ) )
    				$search = " OR ({$search}) ";
    		}
    		$this->se_log( "tag where: ".$search );
    		return $search;
    	}

    Don’t forget to update the file and also make backups before you make any changes (better to be safe than sorry).

    Let me know how it goes, take care and have a lovely day,
    Petra

    Same issue here .. tried replacing this which switches AND for OR and it still does not find multiple tags

    Hey,

    really sorry to hear it doesn’t work but I have re-tested this on my side and again, it works – which theme do you use? Would you be so kind and check if the search works with “Twenty Fourteen” theme?

    Best,
    Petra

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘no tag search’ is closed to new replies.