Viewing 4 posts - 31 through 34 (of 34 total)
  • Author
    Posts
  • #837958

    @fromcouch

    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.

    #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.

    #887584

    Hi @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

    #888709

    Hi,

    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

Viewing 4 posts - 31 through 34 (of 34 total)
  • You must be logged in to reply to this topic.