Tagged: google search, google webmaster, url parameter
-
AuthorPosts
-
August 12, 2017 at 5:15 pm #837958
After extensive testing it works for us (using the testing function provided in Google Webmaster).
If it doesn’t work for you, it suggests there may be some other variables involved.
For example, how are these parameters handle in your Google webmaster account? Do you have a child theme?
In any case, this solution may help some people in the interim until a permanent solution is found.
-
This reply was modified 8 years, 2 months ago by
corefocusgroup.
August 12, 2017 at 10:42 pm #838062@fromcouch – I would not tell other people to stop when you haven’t provided a truly tested solution yourself. As you say “I’m not tested yet” and you also say “But this maybe works”. This doesn’t exactly scream confidence.
December 11, 2017 at 11:25 pm #887584Hi @fromcouch !
I also deactivated the Ajax search from my menu but I’d love to have it back. Did the code you shared help?
add_filter( ‘wp_nav_menu_items’, function($items, $args) {
return str_replace(‘href=”?s=”‘, ‘href=”#”‘, $items);
}, 9999, 2 );For me the main issues is not the blocked URLs or Soft 404s (although it doesn’t look good) it’s the misuse of Google’s crawling budget. A couple of the sites I manage are very high traffic and managing the crawl budget is essential to having new pages indexed.
Thank you!!!
Warmly,
Havi
December 14, 2017 at 3:09 am #888709Hi,
The following filter should disable the theme’s ajax search feature.
add_action('after_setup_theme', function() { remove_action( 'wp_ajax_avia_ajax_search', 'avia_ajax_search' ); remove_action( 'wp_ajax_nopriv_avia_ajax_search', 'avia_ajax_search' ); });You can and should disallow search pages or every url with the search query in the robot.txt file.
User-agent: * Disallow: /search Disallow: /*?s=Best regards,
Ismael -
This reply was modified 8 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
