How to remove search bar from the blog post

This is added by the theme you are using. And, unless there is an option in theme settings (or customizer) to remove it, you can’t do much about it, because you are hosting on WordPress.com, and unless you pay for the premium plan, you can’t modify plugins or themes.

Website Search Results Not Showing Images

Look here: if($row->type==’post’){ $result = wp_get_attachment_image_src ($attachment_id, ‘medium’); $url_img = $result[‘url’]; $permalink = get_permalink($row->id); } You are using attachment_id variable, but you have not initiated it anywhere. if($row->type==’post’){ $attachment_id = get_post_thumbnail_id($row->id); $result = wp_get_attachment_image_src ($attachment_id, ‘medium’); $url_img = $result[‘url’]; $permalink = get_permalink($row->id); }

How to search pdf attachment?

I would recommend you first to search attachments by your search term. For example: $attachments_query = new WP_Query( array( ‘s’ => ‘Your search query’, // <– Your search term ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘application/pdf’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => -1, ) ); With this query, you will get all PDF files that fit your … Read more

Search Results with googlemaps

@Richard, it’s hard to answer this in detail with this little details. Do you need to pinpoint a single house? Will you use an address or will you use latitude and longitude? My suggestion would be to take a look at this excellent Google Maps Plugin for jQuery. jQuery is part of any WordPress installation, … Read more

how can I make the search return only single random correct result?

For a relatively small number of posts, you could try the following: /** * Return a single random search result */ add_action( ‘pre_get_posts’, function( \WP_Query $q ) { if( ! is_admin() && $q->is_main_query() && $q->is_search() ) { $q->set( ‘posts_per_page’, 1 ); $q->set( ‘orderby’, ‘rand’ ); } } ); where we modify the main front-end search … Read more

Search options/filters

First things first: the name attribute for your “All Words” checkbox shouldn’t be ‘s’. That replaces the search text with “1”, so when that’s checked, you’re searching for “1”, not for the search text. I don’t think you want to use ‘exact’ if you’re looking to replicate the example you gave in your question. Here’s … Read more

Putting Text in the Search Box. eg- “Search My Site” [closed]

From the Codex Docs: The is_search() Conditional Tag checks if search result page archive is being displayed. This is a boolean function, meaning it returns either TRUE or FALSE. <?php $search_box_term = is_search() ? get_search_query() : ‘DEFAULT SEARCHBOX STRING’; ?> <input type=”text” value=”<?php echo $search_box_term; ?>” name=”s”> So this ↑ shows either DEFAULT SEARCHBOX STRING … Read more