How to create live autofill search?

The following uses jQuery UI Autocomplete, which has been included in WordPress since 3.3. (I’ve borrowed the format from @Rarst :D). It’s still not precisely what you’re after, but gives you a good starting point. The following uses a the basic jQuery UI styling, but you can use the one that’s currently worked out on … Read more

how to limit search to post titles?

Here’s a filter that’ll do the trick. Drop it into your theme’s functions.php or a plugin. /** * Search SQL filter for matching against post title only. * * @link http://wordpress.stackexchange.com/a/11826/1685 * * @param string $search * @param WP_Query $wp_query */ function wpse_11826_search_by_title( $search, $wp_query ) { if ( ! empty( $search ) && ! … Read more

Include custom taxonomy term in search

I would recommend the Search Everything plugin too, but if you want to implement this using WP’s search function, here’s the code I’m using in my Atom theme: // search all taxonomies, based on: http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23 function atom_search_where($where){ global $wpdb; if (is_search()) $where .= “OR (t.name LIKE ‘%”.get_search_query().”%’ AND {$wpdb->posts}.post_status=”publish”)”; return $where; } function atom_search_join($join){ global … Read more

Customizing Only a Specific Menu using the “wp_nav_menu_items” Hook?

To only add the custom search box to the main menu you could pass the second parameter provided by the wp_nav_menu_items filter and check if the theme_location is the primary location add_filter(‘wp_nav_menu_items’,’search_box_function’, 10, 2); function search_box_function( $nav, $args ) { if( $args->theme_location == ‘primary’ ) return $nav.”<li class=”menu-header-search”><form action=’http://example.com/’ id=’searchform’ method=’get’><input type=”text” name=”s” id=’s’ placeholder=”Search”></form></li>”; … Read more

Extending the search context in the admin list post screen

I solved filtering the query by adding the join on the postmeta table and changing the where clause. tips on filtering the WHERE clause (often require regular expression search&replace) are here on codex: add_filter( ‘posts_join’, ‘segnalazioni_search_join’ ); function segnalazioni_search_join ( $join ) { global $pagenow, $wpdb; // I want the filter only when performing a … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduseduedusedusedueduseduseduedus