I have a bizarre issue with WordPress wherein I have an anchor tag on my about page like this:
<h2><a id="comments">Why No Comments?</a></h2>
and when I link to it in my footer like this:
<a href="<?php echo home_url()?>/about/#comments">Why no comments?</a>
it inexplicably resolves to http://www.everydaytype.com/omments.
What could be going on here?
Note: The same thing happens when I navigate to the URL of the anchor tag manually.
(Reference: everydaytype.com)
UPDATE: I have disabled all of my plug-ins (I have one that manipulates a link in my header), and this is still occurring.
It’s a pretty bizarre thing for a site to do.
If you load the url
http://www.everydaytype.com/about/#commentsinto a View Source window in your browser, you’ll find that it contains the following code:This code does exactly what you’re describing.
I have no idea why it would do that, but that’s what it’s doing.
My guess is that it’s expecting a
#!rather than just a#, hence the dropping of the first two characters rather than just the first, but that’s just a guess. And if that is what it’s expecting, it really ought to be checking for it rather than making an assumption.I guess it must be part of some plugin that you don’t know about or thought you’d disabled haven’t fully, or something. Either way, having the code above to hand should help you locate it.
That’s all I can do to help, but I hope it gets you in the right direction.