In this video you’re going to learn how to create a link which jumps to a different section of the same page.
The post I’m using for the demo contains instructions for a fairly long sequence of steps. I expect my readers to leave the page while they follow each step and then come back to get the next step.
This will make it easy for them to locate the next step they need to follow without wading through all the steps they’ve already done.
Frequently Asked Questions
If you were setting up a FAQ - frequently asked questions page then this method of linking is great.
You’d put all the questions at the top and link them to the answers underneath.
Let’s do it!
You’ll need a target and a link [DUH!]
The target is where your visitor ends up when they click the link. This is most useful for a long post where you want to put in a list of the subheadings at the top so your reader can go from the top of the page to the actual content they’re interested in reading about.
Sort of a mini-menu.
The code for the target (anchor) is
The code for the link is
But we're going to use WordPress's built in link creator to make the linking easier.
The unique-name is the name you assign to the jump link target. Both the link and the target must have the same unique-name. And, of course, you must use a new unique-name for each target. Make it short and relevant so you can remember which name you've given to each target.
Because it’s code you can’t have any spaces in the unique-name. If you need more than one word you can use a hyphen. A short unique-name is better because you’re less likely to type it in wrong when you’re setting it up.
I’m linking to subheadings so for the unique-name I’ll use a word that forms part of that subheading.
You can use any name you like because no-one but you is going to see it.
Code and HTML are 4 Letter Words, Don't Panic!
It's only a little bit of code.
We're going to switch to the Text tab because we're using code.
Mostly you'll want to link to a subheading so you place the target code into the line above the subheading.
Your subheadings and heading will be easy to find because of the H2 or H3 tags. If you have any difficulty locating them use Ctrl+f to open the search box.
Click into the text before your subheading and insert a space above it by hitting the enter key. Type in choosing part of the subheading as the unique name. Make absolutely sure that you type in the code correctly. Spaces and symbols are important.
The hashtag (#) tells the link to jump to the text indicated in the unique-name.
First set up the Anchors (where you're going to link to) then go to the top of the page and add the links.
You add the links the same way you usually link to posts, pages or URLs but you just type in #unique-name. e.g. #export
Save the Draft, Preview and check every link individually. When you know it's working as it should finish your post and publish.
You'll be able to see tiny little anchor icons when you're in edit mode.
As always, I'm here to help you,
Please share the love, click 'Like This' (if you do). Ask a question, share something or leave a comment.