Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using the standard WordPress Archives widget in dropdown mode on my blog. But apparently the Microsoft Bing spider gets confused by it, because the dropdown code looks like this:

<select name="archive-dropdown" onchange='document.location.href=this.options[this.selectedIndex].value;'>
... <option/> ... </option> ... </option> ...
</select>

In the Redirection plugin, it shows a ton of 404 errors due to a spider from Redmond pinging darn near every page and post on my site asking for a "this.options[this.selectedIndex].value;" file.

What's the best way to fix this problem? Should I use a different widget? Is there a way to tell the spider to knock it off? (To be clear: I do want my pages indexed, but I don't want to deal with a with all the 404 issues)

share|improve this question

1 Answer 1

I don't know about Bing's spider but you can create your own widget and instead of using the select tag's onchange event you can use JQuery to bind the change event to do the same:

$("select").change(function () { window.location.replace(this.val()); });
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.