WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a strange issue in that anchor links on the current page work fine, but that the exact same link doesn't work if clicked from another page.

If you go here, and click on any one of the items in the table, It'll take you to the correct area of the page, for instance, searching and clicking on corks takes me to this URL ( http://www.cswd.net/recycling/a-z/#corks ) but if I copy and paste that link into a browser, it will jump to the cork section and then immediately jump down to the bottom of the page.

I don't see any conflicting javascript, the site is using thesis (I didn't have any hand in the design, coding or anything, just doing maintenance), and I'm not getting any errors in the console of firebug.

I've tried removing the trailing '/' on permalinks (as suggested on the wordpress forums) but that didn't work - same issue.

I'm personally stumped. Any ideas?

share|improve this question

closed as too localized by toscho Mar 6 '13 at 23:31

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

As an update: in chrome, opening the above link in a new tab works, while clicking the link directly does not. Both ways in FF do not work, and still jump from the anchor to the bottom of the page on load. Curiouser and Curiouser. – Daniel Mar 14 '12 at 20:47

Just a tip: the structure of the headings with anchor tags is the following on that site: <h2><a id="something" name="something"></a>SOMETHING</h2><p>Description of that thing</p>

However, the paragraph of the Corks section also contains the anchor tag of the following Wood section: <a name="wood"></a>. Then the paragraph is closed and comes the <h2 id="wood">WOOD (clean, untreated)</h2> It also causes the next section (#pressure) jumping to the bottom.

I think moving the wood anchor tag to the Wood h2 would solve the problem: <h2><a id="wood" name="wood"></a>WOOD (clean, untreated)</h2><p>text comes here</p>

share|improve this answer
Thanks for taking the time to look and answer Zsono. Unfortunately, the reason for the wood tag being different was me testing. They were all identical when the problem was noted. Unfortunately items above corks (like windows) have the same issue. You have given me an idea though. Off to check which anchor tag is the first to be broken. – Daniel Mar 15 '12 at 14:56
Smoke and Co2 detectors works as an external link, but not space heaters (the very next anchor). Everything below heaters doesn't work. Strange. There doesn't seem to be any validation errors or anything obvious causing this. Still without a solution, but hopefully something will show itself soon. – Daniel Mar 15 '12 at 21:20

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