Exclude html from search results (image names, etc.)?

One possibility would be to try and alter the search SQL query. There’s a filter for that. $search = apply_filters_ref_array( ‘posts_search’, array( $search, &$this ) ); and (sidenote) a filter to influence the ORDER BY clause as well $search_orderby = apply_filters( ‘posts_search_orderby’, $search_orderby, $this ); I haven’t taken a look at search for quite some … Read more

Limit search to custom field

$type=”bananas”; $args=array( ‘post_type’ => ‘bananas’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘orderby’ => ‘meta_value’, ‘order’ => ‘ASC’, ‘meta_key’ => ‘_bananas_size’, ‘meta_query’ => array( array( ‘key’ => ‘_bananas_size’, ‘value’ => $_GET[‘size’], ‘compare’ => ‘>=’, ‘type’ => ‘NUMERIC’ ) ) ); $my_query = null; $my_query = new WP_Query($args); You can read more about the parameters for the … Read more

Display post titles that match string in post content

The problem is that you are matching the title string in the entire content as whole and not word by word. e.g. if your title is ‘blog’ and content contains the word ‘blogging’, it will still match and pull ‘blog’ from ‘blogging’. So, you can compare them word by word by exploding the content as … Read more

Customise Excerpt start and end

The Search Everything plugin supports “Search Highlighting” in the results page which should produce the results you are looking for. We have no way of knowing how customized the search results page is in your specific project though. You may find that you are fighting an up hill battle until you (or someone on your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)