{"id":684,"date":"2009-03-15T15:17:00","date_gmt":"2009-03-15T22:17:00","guid":{"rendered":"http:\/\/www.itegritygroup.com\/seo-web-development-blog\/?p=684"},"modified":"2011-01-09T01:19:34","modified_gmt":"2011-01-09T09:19:34","slug":"wordpress-hyperlinking-posts-pages","status":"publish","type":"post","link":"https:\/\/www.itegritygroup.com\/wordpress-hyperlinking-posts-pages\/","title":{"rendered":"Adding Hyperlinks to Your WordPress Website"},"content":{"rendered":"

Internal Page and Post Cross-Linking Best Practices<\/h1>\n

When a colleague recently asked me about best practices for linking between pages on his WordPress site, I decided to do some research to see if there was a better way to accomplish this than the built in WordPress standard HTML URL linking tool.\u00a0 Adding internal links throughout your website is enhances user experience, marketing, and search engine optimization (SEO)<\/a>.\u00a0 For example, you may mention a number of your company’s featured products and services on your home page for which you’ve created a separate sales or detail page for each one elsewhere within your website.\u00a0 It’s good practice to hyperlink each p\/s on your home page to each of their corresponding individual pages, because it gives your site visitors an additional opportunity to delve deeper into your website instead of solely relying on them to use your main site navigation.\u00a0 Internal linking is also recognized and valued by search engine crawlers and will contribute to a more [cref website-maintenance positive ranking for your site].<\/p>\n

The first method you could use to link to another page or post within your WordPress website is to use the included link tool in the text editor that appears when adding or editing a page or post.\u00a0 However, this method is best suited for external hyperlinking to other sites than your own, because if you decide to change a page or post name or move it to another location within your website, all the links referenced to it will break.\u00a0 Every time you rename or move a page or post you’ll have to find all the hyperlinks in your website that point to it and update them.\u00a0 As your website scales and grows you can easily image how difficult this would become to manage.\u00a0 Nevertheless, it’s useful to know how to use the link tool for external linking.<\/p>\n

\"WordPress<\/a>

WordPress Link Tool<\/p><\/div>\n

To use the link tool, first select the text you want to hyperlink by highlighting it with your cursor.\u00a0 The link tool (“chainlink” icon button) will then illuminate in the text editor toolbar.\u00a0 Clicking on the link button will open a new window with options to link your selected text.<\/p>\n

\"WordPress<\/a>

WordPress Insert Hyperlink<\/p><\/div>\n

Copy your link URL into the corresponding field and you’re ready to go.\u00a0 You may also choose to configure any of the other options for example, to enhance accessibility and keep visitors from closing your website in their browser when following your external links to another website (setting the Target propery to “Open in New Window (_blank)”.<\/p>\n

Internal Linking Best Practices<\/h2>\n

A better, more dynamic method to internally link, or cross-reference your pages and posts would be to reference them by a unique ID number or Slug name.\u00a0 This way if you a move a page the link doesn’t change.\u00a0 It doesn’t matter where the page is physically located in your website, our only concern is the static unique identifier of the page.<\/p>\n

Fortunately there is an easy way to accomplish this through the use of the Cross-references<\/a> WordPress plugin.\u00a0 To understand how to effectively use the Cross-references plugin, you’ll need to know a little bit about how WordPress names your pages.<\/p>\n

Each page and post in WordPress is assigned an ID number and if you were to use WordPress out of the box you’ll see it names all your pages and posts by a unique number that shows up in its URL.\u00a0 Remember page names and page titles are different; names are the unique name of your page in the URL, Titles are the heading you choose at the top your page or post.<\/p>\n

Many WordPress users change the default number based naming convention in their admin settings in favor of text based permalinks, a more website visitor and search engine friendly convention.\u00a0 WordPress websites and blogs are database driven, that is all of your content is stored in a database and retrieved when a site visitor navigates to a certain page. Permalinks aka a permanent link, is a URL that points to a specific page or post after the content data is pulled from the database and is human readable.<\/p>\n

When adding a new page or post, text based permalinks are then automatically created by WordPress to mirror your page or post title. The permalink for this article is: http://www.itegritygroup.com\/seo-web-development-blog\/index.php\/2009\/03\/wordpress-hyperlinking-posts-pages\/ <\/code>. If we didn’t use permalinks, the URL for this page would look something like http://www.itegritygroup.com\/seo-web-development-blog\/index.php\/page?id=294\/ <\/code>. Not very user friendly.<\/p>\n

If you don’t want to name your page the same as your page title, you can edit the page name portion of your permalink in the area just below your page title. Your page name is also referred to as a Slug.<\/p>\n

\"WordPress<\/a>

WordPress Permalink<\/p><\/div>\n

Page Naming (Permalinks)<\/h3>\n

It’s a good idea when possible to keep your page names to between one and four words separated by dashes.\u00a0 You can use more than four words, however search engines will weight each individual word less as you add more words.\u00a0 You’ll also want to strip out any words in your page name that aren’t relevant to someone searching on the internet to find your content.\u00a0 The default permalink for this post is my website URL + the location of my WordPress site +\u00a0 my page title (Slug): http:\/\/www.itegritygroup.com\/seo-web-development-blog\/index.php\/2009\/03\/<\/span>adding-links-between-pages-on-your-wordpress-website<\/strong><\/em>.\u00a0 There are way too many words in the page name and some that are completely irrelevant to someone who is trying to locate content about linking pages in WordPress, like “to” and “your”.\u00a0 I chose to name my page …wordpress-hyperlinking-post-pages <\/strong><\/em>because these are the keywords I’ve determined individuals are mostly likely to use when searching for my content.\u00a0 This unique identifier for my page wordpress-hyperlinking-post-pages <\/strong><\/em>is my page’s Slug.<\/p>\n

Using the Cross-references Plugin<\/h2>\n

Once you’ve installed the Cross-references WordPress plugin (*ITegrity built websites already have the Cross-references plugin installed & configured) you’ll find the link to it’s configuration page under the Settings link in your website’s admin area.<\/p>\n

\"Cross-references<\/a>

Cross-references Settings (your menu may appear differently)<\/p><\/div>\n

Click on the Cross-references link to open the configuration page.\u00a0 For most websites, you should be able to leave most of the options as is, however there are a few you may want change.<\/p>\n

\"cross-references-plugin\"<\/a>
\nBy default the “Post Identification by” is set to ID.\u00a0 If you are using permalinks it’s better to change the value to “Slug (name)”.\u00a0 Using the Slug instead of ID will save you time when you cross-link pages and posts and is a more intuitive than using an ID number.<\/p>\n

“Related Post List” determines whether the plugin will insert a related posts list at the bottom of each page and post.\u00a0 This means the Cross-references plugin will list all the pages and posts you’ve\u00a0linked to internally from a particular page or post.\u00a0 It’s a matter of personal preference as to how you set this, but I prefer to not show the related posts and pages.\u00a0 The other settings on the Cross-references options page usually don’t need to be changed unless you want to use the plugins more advanced features.<\/p>\n

Now that you’ve got the Cross-references plugin configured properly, how do you actually add the links to your pages and post?\u00a0 Cross-references uses simple syntax for you to add your links:<\/p>\n

[cref “slug-name”]
\nExample: [cref wordpress-hyperlinking-posts-pages]
\nResult when published: [cref wordpress-hyperlinking-posts-pages]<\/span><\/p>\n

In the above example we used the syntax [cref followed by the Slug name of the page or post we want to link to, ending with ]. In this case the link will appear as “Adding Hyperlinks to Your WordPress Website” because that is the page title of the Slug, “wordpress-hyperlinking-posts-pages”.<\/p>\n

What if you want to create a link to a page or post, but you want the text link to be something other than the title? In the example below, we slightly change the syntax to accomplish this:<\/p>\n

[cref “slug-name” “text you want to be linked”]
\nExample: [cref wordpress-hyperlinking-posts-pages How to Cross-link Pages in WordPress]
\nResult when published: [cref wordpress-hyperlinking-posts-pages How to Cross-link Pages in WordPress]<\/span><\/p>\n

All we did differently was add a space after the Slug name and then add the text for which we want to be linked, in this case, How to Cross-link Pages in WordPress. The example below shows you how the Cross-references plugin syntax is used in this article in an previous paragraph:<\/p>\n

\"Cross-references<\/a>

Cross-references Plugin Syntax<\/p><\/div>\n

Changing Page Titles and Slugs and Updating Your Links<\/h2>\n

Once you start adding links to your website and blog in this manner, you may begin to wonder what happens if you decide to change one of your page titles. No problem. All of your links’ text are automatically updated whenever any of your page or post titles change. But what happens if I decide to change the Slug name of a page or post? Will it break all my links because the links are now using an old Slug name? Yes, however the Cross-references plugin provides a tool to update all of your links with one simple procedure. Remember the advanced settings at the bottom of Cross-references options page in your admin? Near the bottom is an area called Tools. The first option is
\n

\"Cross-references<\/a>

Cross-references Slug Rename Tool<\/p><\/div>
\nUnder Tools is the function Slug Rename which enables you to update all of your Cross-references [cref] links site-wide with one mouse click. Just enter the previous name of your Slug and the new name you’ve changed it to and Cross-references will update all the links in your entire website.<\/p>\n

Using traditional static hyperlinks to cross link pages and posts quickly becomes a nuisance as your site scales. Adding and managing internal links within your WordPress website is made into a much easier process when using the Cross-references plugin.<\/p>\n","protected":false},"excerpt":{"rendered":"

Internal Page and Post Cross-Linking Best Practices When a colleague recently asked me about best practices for linking between pages on his WordPress site, I decided to do some research to see if there was a better way to accomplish this than the built in WordPress standard HTML URL linking tool.\u00a0 Adding internal links throughout […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[182,10,12,15],"tags":[52,81,86,162,165],"_links":{"self":[{"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/posts\/684"}],"collection":[{"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/comments?post=684"}],"version-history":[{"count":1,"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/posts\/684\/revisions"}],"predecessor-version":[{"id":3135,"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/posts\/684\/revisions\/3135"}],"wp:attachment":[{"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/media?parent=684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/categories?post=684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itegritygroup.com\/wp-json\/wp\/v2\/tags?post=684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}