<h3 id="post-<?php the_ID(); ?> "><a href="<?php the_permalink(); ?> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?> "><?php echo $title; ?> </a></h3> <?php $excerpt = new SearchExcerpt(); echo $excerpt->the_excerpt(get_the_excerpt()); ?> </div> <?php } ?> <div class="clear"></div> <?php // Pagination if (function_exists('wp_pagenavi')) { wp_pagenavi(); } else {
function the_excerpt($text) { static $filter_deactivated = false; global $more; global $wp_query; // If we are not in a search - simply return the text unmodified. if (!is_search()) { return $text; } // Deactivating some of the excerpt text. if (!$filter_deactivated) { remove_filter('the_excerpt', 'wpautop'); $filter_deactivated = true; } // Get the whole document, not just the teaser. $more = 1; $query = SearchExcerpt::get_query($wp_query->query_vars['s']); $content = SearchExcerpt::get_content(); return SearchExcerpt::highlight_excerpt($query, $content); }
<h3 id="post-<?php the_ID(); ?> "><a href="<?php the_permalink(); ?> " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?> "><?php echo $title; ?> </a></h3> <?php $excerpt = new SearchExcerpt(); echo strip_shortcodes($excerpt->the_excerpt(get_the_excerpt())); ?> </div> <?php } ?> <div class="clear"></div> <?php // Pagination if (function_exists('wp_pagenavi')) { wp_pagenavi(); } else {