Anchor Link To An Anchor Tag On Another Page Does Not Work
-
Information:
Self Hosted WordPress Site
Testing on local host using Uniserver as well as the Test site and pre-production site hosted on the company’s local servers rather than FTP.
Issue- Created several Anchor Tags on one page
Linked to said Anchor Tags via a list on another page.
Anchor Link Code:
`<a id=”anchorlink1″></a>
<a href=”https://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1″>link text</a>`I also tried:
` <a name=”anchorlink1″></a>
<a href=”https://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1″>link text</a>`Result:
When a user clicks the link to the Anchor Link on a different page, the address bar will display the full url with the Anchor Link for a second then the Anchor Link will be removed and only the root URL to the page will be displayed.Example:
Displays for a second:https://fullurlhere/nbs-test-panel-of-diseases-2#anchorlink1
Then it will revert to this:
https://fullurlhere/nbs-test-panel-of-diseases-2
Troubleshooting:
I have done the following trouble shooting all with no effect:- Commented out this code in the .httaccess file: RewriteBase /
- Updated the Settings/Permalinks to remove the /
- Installed the TinyMCE Plugin that inserts Anchor Tags to make sure that I was adding the correctly.
- Tried ID rather than Name
- Moved the Anchor Tag from the inside the H4 tag to outside of it, before and after and in front of the paragraph and outside to see if that would have an effect. (it did not)
- Tried linking from inside the page, rather than to the page. This worked like it should.
- Copy and pasted the full URL into the address bar. That worked too.
It appears that this issue only happens when I link to the Anchor Tag from a different page.
Any help would be greatly appreciated.
- The topic ‘Anchor Link To An Anchor Tag On Another Page Does Not Work’ is closed to new replies.