Support » Plugin: Search Everything » [Plugin: Search Everything] Highlight tags & Categories

  • Just started using Search Everything v6.6, works just fine- thanks!

    I have a few requests to expand highlighting:
    – highlight tags containing search term(s)
    – highlight categories containing search terms(s)

    – also: is there a way to display a post excerpt that contains the searched-for term? When testing the plugin, I realized that the_excerpt may not contain the searched-for term (which might appear elsewhere in the post.

    Great work. –Bill

    http://wordpress.org/extend/plugins/search-everything/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I know that this response is late, but for posterity here’s how to highlight tags:

    1. With your favoured text-editor, open the search-everything.php file that is in your /wp-content/plugins directory/folder.
    2. Go to line 140 (note I’m using version 6.6 of the plugin) and below it, insert the following line of code:
      add_filter('the_tags', array(&$this,'se_postfilter'), 11);

    The code block from lines 135-142 (again I’m using version 6.6 of the plugin) should now resemble the below sample:

    // Highlight content
    if("Yes" == $this->options['se_use_highlight']) {
         add_filter('the_content', array(&$this,'se_postfilter'), 11);
         add_filter('the_title', array(&$this,'se_postfilter'), 11);
         add_filter('the_excerpt', array(&$this,'se_postfilter'), 11);
         add_filter('the_tags', array(&$this,'se_postfilter'), 11);
    }

    What would I need to do in order for it to search taxonomy terms? Currently I output a list of terms into my results based on how they were classified. For example, they are outputted on my post like this:

    <?php echo get_the_term_list( $post->ID, ‘topic-area’,) ?>
    <?php echo get_the_term_list( $post->ID, ‘activity’, ) ?>
    <?php echo get_the_term_list( $post->ID, ‘population-type’ ) ?>

    I’ve tried:

    add_filter(‘the_term_lists’, array(&$this,’se_postfilter’), 11);

    but that doesn’t work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Search Everything] Highlight tags & Categories’ is closed to new replies.