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