There’s more than one way to skin a cat.

And, there’s more than one way to create internal page links to move to specific areas inside a post.

With a few images, I hope to simplify this process to make this so easy for you – it’s like fallin’ off a log.

The Basics

To set up the anchor text, I use this basic layout:

<span id="youranchortext">

</span>

youranchortext” can be any name you desire – but make it unique. I use this a great deal for my monthly question and answer pages – to help my quiz takers link directly to the answer for any question that stumps them – so, I have developed a way to keep my anchor text unique.

For instance, for my November, 2018, answer to question #1, I use the anchor text, “112018A1.” Make sense? It shows the month (11), the year (2018) and the answer number (A1) for the specific question.

But, you can use any combination of letters or numbers or words – just don’t use the same exact combination more than once in any post or the link URL will get confused.

Next, set up the link URL like this:

https://YourWebsiteURL/YourPostURLWhereTheAnchorTextIsLocated/#YourAnchorName

Using this setup, my link on the November, 2018, question page – for the answer to question #1 – would look like this:

https://perfect-vegetable-garden.com/jims-november-2018-gard...

The next few pages show how and where to place the anchor text and the link URL.



Join the Discussion
Write something…
Recent messages
Ruzzty Premium
Hi Bob
Thanks for your help with internal links and pages.
Russ
Reply
Triblu Premium
Hey Bob,

You don't need the first "</span>" tag you are using.

Think of HTML codes this way... first, you turn ON whatever it is you want to do. Let's say you want to BOLD some text, then you would simply turn ON the bold tag this way:
<strong>

and then turn OFF the bold tag this way:
</strong>

so that your line of code completed, would look like the following:
<strong>[text is placed here]</strong>

Same thing for your SPAN tag. Turn it on once and turn if off once. Anything beyond that is unnecessary and only works to possibly confuse a browser.

Not to worry though, as you can easily edit your tutorial.

Hope this helps you.
Reply
bpais1 Premium
Thanks, Trish. I appreciate you finding that error! I should have known better - given the fact that I've used this process so many times. I have updated the training accordingly.

One thing that baffles me, though...

After I add the <span id= "anchortext"></span>, update the post, go to "visual editor", then back to "text editor" to check the HTML one more time - there is an additional </span> added.

So, it has become <span id= "anchortext"></span></span>. Do you think that may be a quirk in my theme?

Jim
Reply
Triblu Premium
I have found that toggling back and forth between Visual and Text tabs seems to confuse WordPress. It has been like this for years now, so when I work in the Text tab (99.9% of the time), and I want to check something, I use the Preview button on the right, to do that.

This is the problem with WordPress as it is build on soooo many other layers of text. I'm surprised that it even works as well as it does.
Reply
tman61 Premium
That was very interesting. i even checked out your site.
Reply
bpais1 Premium
I struggled with internal linking for ages, Tim - before I finally found the solution that worked perfectly for me.

If you get around to trying it, let me know how it goes.

Jim
Reply
Top