How do I make search only search in post content?

This line in $wp_query might be of interest: $where = apply_filters_ref_array(‘posts_where’, array( $where, &$this ) ); You could probably use a filter to toss in an additional post_type=”post”. Something like: function search_where( $where, &$wp_query ) { if ( $wp_query->is_search ){ where .= ” AND post_type=”post””; } return $where; } add_filter(‘posts_where’, ‘search_where’, 10, 2);

Customise search page depending on result

You can create a template file in your theme that is used to display search results. It is called search.php. If it does not exist the index.php file is displayed. At the top of that file, or wherever you want, you can place extra code that queries your special posts (depending on how you saved … Read more

Customize search page

I feel bad for answering my own question on here, but here’s what I did. I created a custom search template, a custom searchform.php and changed my header.php to reflect my custom search page. What I did is rename the search box names to search instead of s to get around WordPress automatically running search.php … Read more

custom wp_dropdown_categories items in wordpress

You should be able to send the desired taxonomies as an argument to the function. This is untested, but should work: $args = array( ‘taxonomy’ => array( ‘galleries’, ‘places’ ) ); echo wp_dropdown_categories($args); For your reference, the function wp_dropdown_categories is defined in “wp-includes/category-template.php” on line 301. Take a look at it as it will help … Read more

Installing Solr for dedicated search

Make sure you use the solr port and hostname provided to you in your opensolr account area for your collection. The default free opensolr server, is running on port 8180. Every single aspect of connecting to the opensolr collections is being explain throughly, through the blog, and through videos. Opensolr is intended to give a … Read more

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