search posts by POST ID

The function you are using might not be working because WordPress’s search functionality has been updated, and it’s recommended to use WordPress’s WP_Query class to modify the main query. Here’s a better and safer way to search by post ID using pre_get_posts hook: function search_by_post_id($query) { if($query->is_search) { if(is_numeric($query->query_vars[‘s’])) { $query->set(‘post_type’, ‘any’); $query->set(‘post__in’, array((int)$query->query_vars[‘s’])); $query->set(‘s’, … Read more

Blocking spambots from Search form

You need to modify the code that processes the search to sense and block invalid attempts. You could do this by looking for a valid session number, or even a session variable that is created by the page that contains the search form. You might also try a hidden field for the search form, although … Read more

I had removed my phone number from my website footer, but months later it still appears once I look it up on google, how to remove it?

It usually takes several days (or more) for search results to be updated. First step would be to look at every single page of your site and check for the correct phone number. Then create a new sitemap.xml file, and submit that to the various search engines (like via Google Webmaster Tools). Many articles available … Read more