How to create an anchor link to text on another page or on the same page.
This time, I would like to inform about something that is called "an anchor link."
What is an anchor link?
An anchor link is a link to another page or post and to a specific place on that page, let's say half way the page for example. This can be very useful when you refer to a specific piece of information on that page.
How do you create such an Anchor Link?
Wel,l you have to do 2 steps for this, the first step starts is to determine which part of which page you want to link to.
You go to your text editor in Wordpress and you search the text, for example, the title of the part you want to link to and then you put this code around it:
<a href="#1">Text where you want to link to, example a title</a>
You also copy the page name (in the URL, for example, \how-to-solve-this-problem) somewhere, I use notepad for this kind of things...
Then you go to the page where you want to link from and this time, we can stay in the visual editor, you search the text where you want to create a link from...
You select the text where you want to link from and click on the link icon in you visual editor toolbox.
In the URL field you fill in the website name, you paste the page name and you add the identifier you have given before, example is:
And as the last step, you click add link and that's it...
When you want to create a link in the same page they call this a "page jump"
You again create an identifier like with the anchor text in the text editor, for example <a href="#2">Text in the same page, you want to link to</a>
And the next step is you create a link in the visual editor, by selecting the text and click on the link icon in the toolbox of the editor.
As URL, you just fill in #2 and you click add link, now you created a page jump in the same page.
TIP: keep you identifiers with a small description in a document, so you always know which identifier you used for which link. An identifier does not have to be a number alone, it can be text also, you choose, I prefer to work with numbers.
That's it for today, I hope some of you will like this little post about the anchor link...
If you have any remarks or questions, please let me know.