Beginner's Guide for WordPress / Start your WordPress Blog in minutes

Beginner’s Guide on How to Add a Link in WordPress

Do you want to add a hyperlink in WordPress? Recently, one of our users asked us how to add a link in WordPress.

There are several different ways to add links in WordPress. You can add links in your posts, pages, navigation menu, sidebar widgets, footer area, and more.

In this comprehensive beginner’s guide, we will show you how to add a link in WordPress posts, pages, widgets, navigation menus, and more.

How to easily add a link in WordPress

Since this is a detailed tutorial, please use the navigation below to quickly jump to the section you need:

Why Are Links Important?

Links are the bloodstream of the internet, which makes them really important.

Basically, most websites on the internet are connected via links, which is why the term ‘web’ or ‘World Wide Web’ was introduced in the first place.

These are the hyperlinked text, buttons, and other elements that you click to go from one page to another or from one website to another.

Imagine visiting a web page with no link for you to click on. You’ll have no option but to click on the back button in your browser.

For individual websites, links tell your users where to click to view more information.

Properly placing links on your website allows you to increase the time users spend on your website. It also helps users discover more content, make a purchase on your online store, or subscribe to your email newsletter.

That being said, let’s take a look at how to easily add links in different areas of your WordPress website.

How to Add Links in WordPress Posts and Pages

WordPress makes it really easy to add links in your blog posts and pages using the block editor.

Simply edit your post or page, or create a new one.

Next, highlight the text that you want to attach the link to. This selected text is called the anchor text for the link. Now click on the ‘Link’ button:

You’ll see a box where you can enter a URL. A URL is a web address. For instance, WPBeginner’s guide on how to start a WordPress blog has the URL

You can simply copy and paste the URL of the post or page you want to link to, like this:

Creating a link by pasting in a URL using the WordPress block editor

Click the Apply (Enter) button to insert the link into your post.

If you’re linking to content on your own site, then it might be quicker to search for it. Type a word or two from your content title, and WordPress will find it:

Searching for a page to link to using the WordPress block editor

Click on the title of the page or post you want to link to, and the URL will be automatically added for you. Again, you’ll need to click the Apply button to put the link into your post.

If you want to set your link to open in a new tab, then click the arrow on the right. You can then click the toggle and set your link to open in a new tab.

Setting your link to open in a new tab using the WordPress block editor

Note: We recommend that you only use this option for links to third-party websites. This way your users don’t leave your website while visiting it.

Adding Link in Old WordPress Editor

If you are using the older classic editor instead of the block editor, then the process for adding a link is quite similar.

Open up the post that you want to edit, or create a new one. Find the text you want to use as the link’s anchor and highlight it. Then, click the ‘Link’ button which should appear in the first row of toolbar buttons.

Creating a link using the WordPress classic editor

You can then copy and paste the URL you want to link to, or search for it, as in the block editor.

Pasting your URL directly onto the anchor text

Another, even quicker, way to add a link in both the block editor and classic editor is to simply paste the URL onto the anchor text.

First, copy the URL you want to link to. Then, highlight your chosen anchor text in your post.

Next, you can either right-click and select ‘Paste’ or simply press Ctrl+V (Windows) or Command+V (Mac) to paste the URL.

Paste your link directly into your content

WordPress will automatically detect that you’re pasting a URL, not text, and will turn the anchor text into a link.

Take a look at our tips for mastering the WordPress content editor to learn more about using the block editor effectively.

How to Add Links in WordPress Text Widgets

WordPress allows you to add widgets to your site’s non-content areas like sidebar, footer, or other widget areas.

Some of these widgets are automated and do not have many options. For example, the Recent Posts widget will automatically show links to your recent posts. You don’t need to do anything extra.

However, if you want to add some custom text with links in your sidebar, then you can use the Text Widget.

Go to the Appearance » Widgets page and then drag ‘Text’ widget into your sidebar or other widget area.

You can then type in your text and add a link just as you would when adding one to a post or page.

Adding a link in a widget

Make sure you click the ‘Save’ button beneath your widget after making changes.

How to Add Links in WordPress Navigation Menus

Do you want to add links to your site’s navigation menu? WordPress comes with a built-in drag and drop menu editor which allows you to create and manage navigation menus on your WordPress site.

Go to the Appearance » Menus page. If you don’t already have a menu set up, then you can create one by entering a menu name.

Next, select the pages you want to add to your menu on the left-hand side, then click the ‘Add to Menu’ button.

WordPress will automatically link to your selected posts and pages. You can move menu items and up and down to rearrange them.

You can also add any link you want to your menu. It doesn’t have to be a page or post on your site. For instance, you could enter the URL of your Twitter profile and add that to your navigation menu.

To enter a link, just click the arrow next to the ‘Custom Links’ section on the left. You can then type in the URL and the text you want to use for the link.

Adding a custom link to your navigation menu

For more help with creating your menu, take a look at our beginner’s guide on how to add navigation menus in WordPress.

How to Add Title and Nofollow in WordPress Links

It’s often useful to give your links a title. This is the text that appears when someone runs their mouse cursor over the link, like this:

A link with a title

Adding a title often makes it clear where the link leads to. It can be helpful or even reassuring for your readers.

However, WordPress does not allow you to add title to the links with the default editor. You can still add it, and we’ll show you how to do that in a bit.

You may also want to add a nofollow tag to external links. This tells search engines not to pass your site’s SEO score to that link because you don’t own or control the content on that website.

WordPress also does not support nofollow by default either.

Method 1. Use AIOSEO plugin in Gutenberg

All in One SEO plugin (AIOSEO) for WordPress automatically adds the title, nofollow, sponsored, and UGC attributes to your links.

All in One SEO Title and Nofollow

Method 2. Use HTML code in Gutenberg

If you’re using the Gutenberg editor, and don’t want to use AIOSEO, then you’ll need to manually edit the HTML to add title and nofollow attributes to your links.

First, add your link within your paragraph block in the usual way. Next, click on the three vertical dots and select ‘Edit as HTML’ as shown here:

Switching to the HTML view of a block in the WordPress block editor

You’ll now see the HTML code for your block.

Viewing the HTML code for a block in the WordPress editor

You can add a title and/or a nofollow attribute to the link like this:

<p>You can find out more about our company on our <a href="" title="About Us" rel="nofollow">About Us</a> page.</p>

For the title, you can change “About Us” to be whatever you want. With the nofollow attribute, this should always be rel="nofollow". Don’t forget the double quotation marks around the title and the “nofollow” as your link won’t work correctly without them.

Method 3. Use a Plugin with the Classic Editor

If you’re using the Classic Editor, you can install and activate the the Title and Nofollow for Links plugin.

This plugin will add title, nofollow, and sponsored checkbox options to the insert link popup.

Highlight your anchor text and click the ‘Link’ button, then click the cog:

Locating the cog icon for a link in the classic editor

You’ll then see the additional options:

Additional options created by the Title and Nofollow for Links WordPress plugin

For more help, take a look at our guide on how to add title and nofollow to the insert link popup in WordPress for more information on this plugin.

How to Add Link Buttons in WordPress

Do you want to add a button to your WordPress posts or pages? There are many ways you can do this. The easiest is using WordPress’s built-in Button block.

Create a new post or page, or edit an existing one. Then, click the (+) icon to create a new block. Select ‘Button’ from the ‘Layout Elements’ options, or simply search for the Button block.

Adding a 'Button' block to your post or page in WordPress

You can type the text for your button by clicking in the colored area. Enter the URL that the button should go to in the ‘Link’ box.

Adding the text and link for your button

To change the button’s alignment, or to make the text bold or italic, just use the controls at the top of the block itself.

You can make more changes to how the button looks in the block options on the right-hand side of your screen. For instance, you might want to change the color or add a wider border.

You can also change the link settings here. You can set your link to open in a new tab, and if you want, you can also add the ‘nofollow’ attribute to the link by typing it in the ‘Link rel’ box.

The right hand panel where you can edit your button's design and how the link works

What if you’re still using the old WordPress classic editor? You can install the “Forget About Shortcode Buttons” plugin to easily create buttons while you’re editing a post or page.

Simply install and activate the Forget About Shortcode Buttons plugin. Then, create a new post or edit an existing one.

You’ll see the ‘Insert Button’ icon in the toolbar, on the right hand side:

The Insert Button icon on the right hand side of the classic editor's toolbar

Click on the button, and you’ll see a popup. Here, you can customize your button, choose colors, borders, add text, add an icon, and include the link itself while seeing a live preview.

Creating a button for your link and customizing the design

For more information and details take a look at our guide on how to add buttons in WordPress without using shortcodes.

How to Embed Linked Content in WordPress

You can easily embed certain types of content in WordPress by simply inserting its URL in your post. This is sometimes called creating a “content card” in your post.

Just paste the whole URL into its own paragraph block. The whole tweet, including images, likes, timestamp, and more will be embedded like this:

Embedding a tweet by pasting in the link to it in WordPress

The process is the same for YouTube videos. Simply find the video you want to use on YouTube and copy the URL from the top of your browser window:

Get the link to your chosen YouTube video from your browser's address bar

Next, paste the link into your post or page. It’ll automatically embed the video:

Embedding a YouTube video into your post

As well as being great for Twitter posts and YouTube videos, this method also works for many other types of content. You can find out more from WordPress’s support article on ‘Embeds’.

How to Add Affiliate Links in WordPress

Do you want to increase your site’s revenue by using affiliate links? Affiliate marketing provides a steady income to many blogs and websites.

All you need to do is add special referral links to products and services that you recommend. When your visitors purchase these products after clicking your links, you get a commission.

The problem that most beginners face is that each product or website they want to recommend has a different URL. It’s tricky to keep track of these, especially if you’re recommending lots of products.

The best way to add and manage affiliate links is by using an affiliate management plugin. We recommend using either Pretty Links or Thirsty Affiliates.

Both of these plugins work by creating redirect links such as that send people to your special affiliate link.

The plugins will add a new option to your WordPress menu where you can add your affiliate links. Here’s how that looks with ThirstyAffiliates. You simply copy and paste your special affiliate link into the ‘Destination URL’ box.

Adding a link in ThirstyAffiliates

You can set specific options for your link on the right hand side, deciding whether to nofollow it, open it in a new window/tab, and more.

Setting the options for your affiliate link with ThirstyAffiliates

Once you’re done, click ‘Save Link’.

After you’ve set up your affiliate links, you can easily add them into your posts and pages. In a paragraph block, click the down arrow then select the ‘Affiliate Link’ option:

Adding an affiliate link to your post

Next, type in the start of whatever you named that affiliate link. In our example, that’s “Our Affiliate Partner”.

Finding your affiliate link by searching for it

You can then click the name and click ‘Apply’ to add the affiliate link to your post.

If you ever need to change an affiliate link (e.g. if the company you’re linking to moves to a different affiliate program) then that’s really easy to do.

You just change it once in your dashboard, under “ThirstyAffiliates” or “Pretty Links”. The redirect link stays the same as before, but it’ll now redirect to the new affiliate link everywhere it’s used.

For more handy affiliate plugins, check out our post on the best affiliate marketing tools and plugins for WordPress.

How to Manually Add a Link in HTML

Occasionally, you might want to add a link to your site using HTML code. This could happen if you need to use a custom HTML block or widget.

You might also need to directly edit a link in your theme file. Just make sure you always use a child theme so you don’t lose your changes when you update the parent theme.

It’s easy to create a link in HTML. To try it, add a custom HTML block to a post or page. You can find this block under ‘Formatting’ or you can search for it using the search bar.

Adding a custom HTML block to your post or page

Next, you’ll see a box where you can write HTML. Copy this code into the box:

<a href="">Text</a>

It should look like this:

The HTML code to create a link

You can click the ‘Preview’ tab to see how your code will look in your post or page:

Previewing how the HTML will display in the post or page

Now click back to the ‘HTML’ tag. Change the URL to the URL you want to link to. Change the word ‘Text’ to whatever word or words you want to use for your link.

To add a title to your link, you’ll need to include it in the code like this. You can change “This is the title” to anything you want.

<a href="" title="This is the title">Text</a>

If you want your link to open in a new tab, simply add target="_blank" to the HTML code, like this:

<a href="" target="_blank">Text</a>

If you want your link to be nofollowed, add rel="nofollow", like this:

<a href="" rel="nofollow">Text</a>

You can include all of these at once. This is how a link with a title, that opens in a new tab and is nofollowed, would look:

<a href="" title="This is the title" target="_blank" rel="nofollow">Text</a>

That’s how you create a link in HTML, if you ever need to.

An anchor link is a type of link on the page that brings you to a specific place on that same page. It allows users to jump to the section they’re most interested in.

Take a look at the animated screenshot below:

Anchor link preview

These type of links are really helpful when writing longer tutorials or content, so your users can easily jump to the section they’re most interested in.

We have created a detailed step by step guide on how to easily add anchor links in WordPress.

Want to add social share links or buttons on your site?

These links make it easy for your users to share your content on their favorite social networks. Sometimes social share links or buttons are also accompanied by total share count.

Facebook social share button

We don’t advise users to add these links manually. Instead, you should always use a social share plugin.

We have a step by step guide on how to add social share buttons in WordPress.

We hope this article helped you learn how to add a link in WordPress. You may also want to see our beginner’s guide on how to create a professional business email address, and how to start an email newsletter to grow your audience.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

64 CommentsLeave a Reply

  1. I find it difficult to add a link on my WordPress website, but thanks to these helpful guidelines.

  2. How do I link to an article on another website, but instead of linking just to that particular page, have the link jump to a certain part of that article?

  3. I am adding links to the text of posts and it is automatically separating the link to the next line (so it’s all by itself). Why is this happening and how can I stop it? It makes it impossible to put links into a paragraph.

  4. Great wordpress tutorials. So easy to understand.

    Is it possible to anchor a particular place on another linked page?

    • Yes, you would follow the same steps as you would with other anchor links, and even when you place them on another page they should work the same.


  5. Thanks for the information. For some reason a space is added to the front and back of a word/phrase that I turn into a link. Would you happen to know why this is happening? I will open up settings of the link and remove the spaces, but they show back up when I save/update.


  6. I have used the “old method” for years to post blogs for our golf course website. Now I have oodles of posts, so “they” want me to use a permaliks- I am totally lost!

  7. I have links at the bottom of my webpage and the list is getting a bit long. Is there any way to make them appear in two columns rather than a single long column?

    • It would depend on how you’re adding the links and your specific theme. If you reach out to your theme’s support there may be a design for your theme for two widgets in the footer rather than one if that’s how you’re adding the links.


  8. I can’t seem to find a way to make links a specific color. I had heard you should select Theme Options from the Appearance category in the Dashboard, but there is no Theme Option. I also cannot find it in the Custom area. Where is it? thank you.

  9. I am currently working in WordPress, and I cannot find the link button on the menu in the dashboard.
    Please tell me has the ink button been taken out of the WordPress dashboard menu.
    it used to be in this order
    Users …….

    There is no link button on the 4.9.8 version of my WordPress.

  10. Hi is it possible if I have a link to add it to a blog post or page as the actual page and not the link?

    So instead of a signup page as usual. When they open the page it goes directly to the sales page?

    ty in advance

  11. Directions for simple link to blog seems to be outdated. Have used for years, but current option does not show “add link” just a list of former blogs. What happened?

    • Hi Linda,

      Yes, you are right. We will be updating this article soon. Meanwhile you can still find the insert link button in the post editor. You can also use CTRL+K (Command+K on Mac) to insert link address.


  12. I have a problem when adding a link and making a link to the text begins to place the link in the appearance and disappear many times

  13. What is the correct method of internal link? domain/post name OR just /post name? I have used /post name and that is working fine on site, but yoast not identifying as internal link. Kindly advise.

  14. Wp begginer is the best way to learn WordPress thank allow, I have fined exactly post am looking for.

  15. Hi,
    I have a website when I first got it about 3 months ago everything was fine. Now all of a sudden I can’t make any new post or pages. Also I can’t update anything in website configuration settings. I get a message something like wp-admin php index page not found or this page contains a unknown code. Any feedback on this problem will be greatly appreciated. I also can’t hyper link anything. Even if I could it wouldn’t do any good because I can’t publish anything. Can someone please help me I will recommend you on my website. Thanks!

  16. HELP!!! I am not a coder, and blogging just for pleasure, but I cannot get a link to work. I had my theme professionally installed and have not messed with the code any. The url works but the link text does not show up. I am left with blank spaces in my writing. If you know that something is there you can click on it, and it will re-direct you appropriately, but I do not know how to address the text not appearing. Any advice?

    Here is a copy of a paragraph from a post:

    In edit mode it looks fine, but if you view it live you can see the blank spot.

    Thanks so much for any help.

    • Hey Kara,

      It seems like the color settings for links in your theme are set to use white color for link text. You can check your theme’s settings by visiting Appearance » Customize and look for colors section. There you need to look for links color option it would be set to white. You will need to choose a darker color and then save and publish your changes.

      If you cannot find the colors option in your theme settings, then you can go to Appearance » Customize and then click on the ‘Additional CSS’ tab.

      This will show you a text box. At the end of this text box, add the following custom CSS:

      .entry-content a {
          color: #000;

      See our article on how to add custom CSS in WordPress for more detailed instructions.


  17. Hi,

    I would like to add a link in the Primary Navigation that will jump down to a certain part of the homepage. Is that possible?

  18. Hi,

    I want to add an internal link to a home page description.

    I have a responsive theme and can’t see anywheee where I can input the link as in a post

  19. I am the senior writer for Biff Bam Pop. com and also have my own wordpress blog gilbert speaks and on both sites, the link button will not work for me. This problem began a month ago and nothing I or the administrator for BBP have done has worked. I do reviews of television and film and also interviews for Biff Bam Pop and not having a link button is very stressful. Would you be willing to walk me through this frustrating matter over the phone?

  20. I am still having problems adding links. I am now getting some links happening but not others even within the same post? What is going on? It can’t be any plugin issue because some links work and others wont. I’m following the same process! Help. Feeling VERY frustrated!

  21. Hi,
    I am having the same problem as Tara above. Only I can link some and when I look on the preview some of the links will be highlighted but not all. I am doing it the same exact way for all the links. What is causing this?

  22. I have tried to insert a link and it all seems to work until I update the blog post. It just appears as normal text in the post and is not a link! Any suggestions?
    I’ve done it before in other posts and have not added any new plug ins.

  23. I am trying to add a link to amazon associates page in a post. when I click on link it takes me to a blank page site. But in the widgets it works and takes me to the amazon product. Am I missing something.

  24. Great article!

    I have a problem that is when I click “Add Link” button in the editor I do not get a selector for the articles/pages I have. Thus, I have to enter the URL manually

    Any ideas how to resolve that?

    • You need to click on the text that says ‘Or link to existing content’, it will expand the Insert Link popup and will show a search field. Type something from the post/page title that you want to link to and it will start showing it in the result. Please see the Gif animation in the article.

      If you do not see the ‘Or link to existing content’ text or your it does not work, then this could mean that a plugin or your theme is causing conflict. Try after disabling all your WordPress plugins temporarily. If it works, then enable plugins one by one and retest until you find the one causing the conflict.


  25. So, I’ve successfully entered a hyperlink using the “Insert/Edit Link” button, but when I preview my blog page, the link does not show up (it’s a blank white space) until I hover my mouse of the space and then it shows up red. How can I get the link to display without hovering my mouse over the link?

    • This is a CSS issue in your theme’s style sheet or may be a plugin is causing the issue. You can try these steps:

      1. Deactivate all your WordPress plugins and then see if the link color returns back to normal. If it does, then activate plugins one by one until you find the culprit.

      2. If it is not a plugin, then it could be a change you made to your theme. You can try installing a fresh copy of your WordPress theme but we will warn you that if you made any changes to theme code, then you will lose them.

      3. Your theme may be using a dark color as background which you changed to a lighter background?


  26. Best beginner’s tutorial on WordPress. Thank you! All other ”tutorials” read like physics lectures.

  27. Thank you for this valuable information.
    I get your WordPress weekly tips.
    I was able to fix a web link with your widget instructions.
    I really like the Forget Short Code Plugin. I was able to add in new boxes, etc. to enhance my site.

  28. Hi,
    My blog is a free blog. I promote books so I have pages for each book. How do I include an image with every tweet that is sent. Every one would have to be different for each page. I don’t know what you call this so I don’t know what to search for. I have noticed there is an image, sometimes, but not always.
    Thanks for the help!

  29. I don’t know how I made this mistake, but….after I put in link (between 2 pages) when I click on either one I get “WordPress cannot find this page”. If I erase and start over here, I get the same one. What did I do the is incorrect? website: ; jake361denis. category: A Thing Compendium. Post: Dromedary Dreams.
    How avoid this?

  30. Hi Syed,

    Great complete presentation.

    I have already learnt alto about compress in less than a month. Am satisfied I subscribed to

    Keep up educating the world.


  31. Thanks for the tips. I have a question about the amount of plugins that are appropriate. I’ve heard that too many plugins (as in more than 15) slows down a page and is unnecessary. What are your thoughts?

Leave a Reply to Niall Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.