hello Internet people in this video
I'll show you two ways how to add
an anchor link to your WordPress post, but this
will work also on pages and menus and
also I'll show you how to reach the
anchor from another page after this
video you can get yourself one of these
tattoos so that the ladies can link to
you from anywhere
alright as mentioned the simplest way to
add an anchor link to your WordPress
doesn't require any plugins here is what
I mean by anchor link you click on the
link and it takes you to another part of
the same page and you'll need a plug-in
if you want to make the scroll smooth so
let's get started
login to your WordPress and go to the
post you want to edit and then navigate
to the text that you want to make into
anchor link let's convert this text to a
link by clicking here and now in the URL
section you have to put a hash sign
before the name and don't use the any
special characters or spaces if you want
separate words you can use hyphens the
name can be anything but I like to make
it relevant to this section so for
example I put here
hash tag anchor - Ling - info and I'll
save this link now let me go to the
website if we click on the new link
nothing really happens except that here
in the URL you'll see that I have this
hash anchor or link info this is because
we established the link but your browser
doesn't know where the anchor tag is
so let's add it now scroll down to the
section you want to display when someone
clicks on the link we just created the
highlight the text I usually linked to
the headers like this one here I think
this one is h2 now you need to switch
the mode from visual to text find the
highlighted text now you see that your
title is wrapped around some sort of
container in my case is h2 this is just
some HTML code for header two so let's
make a bit of space here so just after
the h2 and add the following ID equals
double quote anchor - link - info double
quote in this case when you add the ID
you don't need the hash because the ID
basically means already the hash so
leave it out when you type in this part
just remember the ID has to be unique on
page or you might break some other
JavaScript so now if I save and go see
on the front end and i refresh the page
as you can see when I click on this link
it takes me to the section way below
amazing and I know you're feeling like
this guy
now the scroll is very sudden but it's
really simple to set up if you want it
to be smooth we need some JavaScript or
use a plugin I'll show you how to do
this with a plug-in in just a moment let
me first show you how you can link to
this section from another page so open a
new browser window and grab the URL from
the article and at the end of the URL
add the anchor tag so in my case it's
hash tag anchor link info and hit the
enter and the page opens in the right
section as you can see here so you can
add this URL to any link or any page or
in the menu and this will work so the
hash tag just tells the browser which
section you want to see just make sure
you double check your hash tags so you
don't end up like this
now what if you want a small page scroll
when you click on anchor link so
something like this for this you need
some JavaScript so easiest way is to
install a plugin called page scroll to
ID so go to your plugins and add new in
the search box type page scroll to ID
and install the plug-in and once it's
done activate it now this plug-in has a
lot of different settings and you can
play around with them if you want to you
can find it under the settings you can
see here on left page scroll to ID
there's a lot of different settings but
the default settings do a really decent
job so I'm gonna leave everything as
this so let's go back to the post I
prepared earlier
so let's just quickly remove what we
added before because you want to have a
clean slate to use the plug-in so just
delete the link and then scroll down
change to text view and remove the ID
and the anchor and as you can see there
are two new icons here the first one is
to set out the link and that one with
the bullseye is the anchor and let's add
a new link to this text so we will
include the hashtag anchor link info
here and another thing you need to
include in this is this class name which
tells the WordPress to use the plug-in
so add the ps/2 ID to the custom classes
like this and if we take a look in the
text view you will see that it has added
a new class PS to ID like this so all is
good okay now scroll down to the point
where you want to have your anchor I'll
place my cursor just after the header
and then I click on the bullseye icon
add the idea without the hashtag and
click say as you can see WordPress adds
the shortcode here that's okay it will
not appear on the website it's just a
way for for it to tell the website where
to scroll to and don't forget to save
the changes let's take a look how it
looks like on the side so if i refresh
and then I click on the link it will
scroll smoothly to the anchor and as you
can see the shortcode is not appearing
anywhere so you can have multiple anchor
tags on one page just set them up give
them unique IDs and you'll be good to go
my name is Robert and if you're looking
to master the digital world while
getting entertained this is the channel
for you so hit that subscribe button and
find the bell icon so that you get
notified about new videos and here are
two videos related to WordPress that you
might find useful whoosh
