Linking between pages is one of the key components of web pages on the Internet, and WordPress ones are no different. Hyperlinks interconnect websites and their web pages and imply a relation or lack thereof, such as when pointing to external websites you don’t control. Either way, website owners need to know the procedure to do things properly. That boosts their SEO (Search Engine Optimization) and helps their visitors navigate the site. Plus, learning how to link pages in WordPress removes the risk of incorrectly linking to shady sites.
1. Add internal or external page links in Classic or Block Editor
The primary method to link pages in WordPress is to add an inline hyperlink. In most cases, you would do that manually. The functionality will turn the link blue and make it clickable. You can also find SEO plugins that will automatically suggest and link phrases on your pages. However, we recommend that beginners hold off on that. With that said, linking WordPress posts or pages works like this based on the editor:
Adding links in Gutenberg or Block Editor
Begin by opening an existing post or a page or creating one. Then, follow these instructions for linking a page in Block Editor:
- Type a word, phrase, domain name, or whatever you want to be clickable. We’ll use “contact us”.
- Highlight the desired text (called “anchor text”) and you’ll see a toolbar appear above.
- Select the link button in the toolbar or press Control + K (Windows, Linux) or Command + K (Mac).
- A box where you can enter an URL (Uniform Resource Locator), i.e., the web address of the page on the Internet appears: That can be:
- Internal URL — An URL on your website. You can search for it and click the fitting option from the list or enter an URL (
https://www.your-website.com/contact-us
) - External URL — An URL on the Internet, for example, Facebook. Only link to a trusted website that fits the anchor text. You can still link to a relatively unknown website or one you have no ties to if compulsory. We’ll explain that in step 6, option 2.
- Internal URL — An URL on your website. You can search for it and click the fitting option from the list or enter an URL (
- If you didn’t select an option on the list, click the rotating arrow icon next to the URL or press the Enter key.
- You will now have three toggle options:
- Open in new tab — Only use this option for external websites. Opening an internal link in a new tab increases your bounce rate and visitors are less likely to browse your website.
- Search engines should ignore this link (mark as nofollow) — We already taught you to add a nofollow tag to links in WordPress. That tag signifies that search engines shouldn’t transfer your link juice, i.e., that you have no ties or control over the editing of that page.
- This is a sponsored link or advert (mark as sponsored) — Tells visitors and search engines that an external site has sponsored your post or page. They will treat it as an advertisement for their content, service, or product.
- Click somewhere else to apply changes and make the toolbar disappear.
Note. You can copy an URL, highlight the anchor text, and paste the URL. WordPress will automatically link the anchor text and give you the options mentioned in step 6.
Linking pages in Classic Editor
You can insert a link to a page in Classic Editor like this:
- Start editing a page or a post.
- Highlight the anchor text.
- No toolbar will appear this time. You can find and click the Link icon in the big toolbar at the top of the page or press Command + K (Mac) or Control + K (Windows) again.
- Paste the URL in the text field or search for a page on your website. Press the arrow icon or the Enter key to apply changes.
- To see the first and/or the second option from step 6 above, click the cogwheel icon. You may need an add-on to nofollow or sponsor links. Click the Add Link button.
- The link will become blue, and you can click it to access the option above.
2. Using HTML to create links between pages in WordPress
Everything you did in method 1 is transformed to HTML behind the scenes by WordPress. Luckily, we put together a comprehensive guide to editing HTML in WordPress. Follow method 1 as it tells you how to switch between Text/Visual Editor and HTML/Code Editor. The HTML for an internal link is rather simple:
<a href="https://your-website.com/contact-us">Contact Us</a>
If you want the link to open in a new tab, it would look like this:
<a href="https://external-website.com/contact-us" target="_blank" rel="noreferrer noopener">Contact Us</a>
If the link needs to be nofollowed, it looks this way:
<a href="https://external-website.com/contact-us" target="_blank" rel="nofollow noreferrer noopener">Contact Us</a>
HTML gives you a chance to add a title, i.e., what users see when they hover over a link:
<a href="https://external-website.com/contact-us" title="Text that shows when you hover" target="_blank" rel="nofollow noreferrer noopener">Contact Us</a>
3. Link pages from a WordPress widget
Sometimes you want to add links to pages outside the content text. Widgets such as the sidebar and footer are ideal for that since they let you link pages subtly. Linking a page from a widget in WordPress works this way:
- Open the left sidebar in the WordPress Admin section.
- Go to Appearance → Widgets.
- Add a new widget by clicking the blue + icon in Block Editor.
- Select the Paragraph widget.
- Type the anchor text and add a link as we described in method 1.
For Classic Editor, you need to disable Widget Blocks in WordPress, then make changes. It is not worth the effort for simple links.
4. Add links to pages in the WordPress navigation menu
We demonstrated editing menus in WordPress in the past. After going to Appearance → Menus, select these options:
- For internal pages — Put a checkmark in front of a page under “Most Recent”, “View All”, or “Search” then click Add to Menu.
- For external pages — Select the “Custom Links” option, then enter anchor text under “Link Text” and the web address under “URL” before clicking Add to Menu.
If you need help with external links, check our “adding nofollow links in WordPress navigation” guide.
5. Use a button to add a link to a WordPress page
This option became hugely popular in Block Editor since it doesn’t require WordPress plugin installation. Follow these steps to link WordPress pages via a button:
- Click the + button to add a block while editing.
- Find Button and click it.
- You’ll now see a button you can modify in the “Block” tab in the drop-down menu on the right side.
- Add a link by clicking the Link icon in the toolbar when the button is selected.