An anchor link is a link that, instead of just loading the page normally, takes you to a point somewhere further down the page. It’s pretty simple to do in WordPress and you should be able to master it pretty quickly by following these steps:
- In the destination page, while in edit mode, click on the ‘Text’ tab in the top right of the editing area. This will allow you to view some of the page’s code.
- Scroll down to the location you’d like to link to and type in the following, using only lower case: <a name=”point1”></a>
- Replace “point1” with a word of your choosing that is meaningful, keeping it short and appropriate.
- Double check it – if you get it even slightly wrong it will cause problems.
- Switch back to ‘Visual’ tab.
- Hit ‘Publish’.
- Now, go to the page where the link will originate.
- Create a link as per normal, but include the anchor at the end of the url. Look at the example below carefully as you must follow it exactly and include the slash and hash before your anchor word:
- Normal link: http://www.example.com/examplepage/
- Anchor link: http://www.example.com/examplepage/#point1
- Hit ‘Publish’ and then make sure you view the published page and check it works!
If you’ve not used the text editor before here are a couple of tips to bear in mind:
- The text editor can be unforgiving if you make a mistake so be very careful.
- It helps to insert the anchor a line or two higher than the point you’d like to link to. This way the title of the section you link to will appear.
- All code in the editor will come in pairs. E.g. <b> followed by </b>. The second item of the pair always begins with a slash. Don’t put anchors between any of these. Always put them outside of any pairs you see.