Home » All, Taiwan

Inserting Links in Posts and Pages in WordPress

Submitted by on November 14, 2011 – 12:23 pm
Architecture

Being a complete WordPress novice, I’m still learning the absolute basics. My project for this morning was to simply insert a link to a Page or Post inside another Page or Post on my blog. It turned out to be exceptionally easy to do (once I figured it out). Here’s what I learned:

To start with, you have to know how to work with Pages and Posts. Of course, you create and edit Posts and Pages in the Dashboard. To create a new Post, look under the Post tab. There you will see an item labeled Add New. Click on that, and boom, you have created a new Post and you will be in the editing window. Creating a new Page is almost identical. Look under the Page tab. There you will see an item labeled Add New. Click on that, and boom again, you have created a new Page and you will be in the editing window. To open an old Post or Page, simply click on All Posts or All Pages to get a list of all your Posts and Pages. Find the Post or Page you want to work on. If you hover your mouse over the name of the Post or Page, a little menu will appear underneath it. Click on “edit” in that menu, and WordPress will open the editing window where you do all the work.

Unfortunately for us newbies, the editing windows for Posts and Pages look nearly identical. In fact, the only obvious difference (other than the heading) is that a Post has a picture of a thumbtack at the top left and a Page has a picture of two pieces of paper. Understanding the differences between Posts and Pages is not easy for most newbies, and having these editing windows so close in appearance certainly doesn’t help. It would be nice if they each had a distinct look and form.

In any event, I’m here to talk about inserting links, and the process is identical whether we are talking about a link in a Post or a link in a Page. First, perhaps, I should talk about what a link is and what purpose they serve. You see links everywhere on the Internet. They are basically anything you can click on that brings you to another webpage whether on the same website or a different website. If you are a Harry Potter fan, you can think of them as Portkeys – any object that has been magically transformed to transport you to somewhere else when you touch them. Just as any random object (like an old boot) can be turned into a Portkey, pretty much anything on a webpage can be turned into a link – pictures, graphics, letters, words, sentences, etc.

This has very cool implications for a blog, where there is generally a lot of text. In a new Post, you might refer to something you talked about in an old Post. Instead of telling your reader to just go look for that Post in the menu or archive, you can create a link to that Post – a magical Portkey that will take them right there. And you can turn any word, phrase, or sentence in your blog into a link. The classic example would be a sentence like this: To read about my trip to Guinea, click here.

The blue highlighted word “here” in that sentence is a link. When the reader clicks on it, they are taken to another Page on my blog, the Page where I have information about my trip to Guinea. There’s no reason why the word “here” has to be the link. I could have done it this way: You can also read about my trip to Guinea.

Now the word “Guinea” is the link, and it does exactly same thing as the word “here” in the first sentence. They’re not really Portkeys, but they feel almost as magical to me. They’re a great way to link together all of the Posts and Pages on your blog. When I saw this on other blogs, I was very impressed. I thought it was a very difficult and complicated technical task to set up a link. In fact, it’s easy. It may not be easy and intuitive to figure out how to do it the first time (hacking through the thousands of pages of the WordPress Codex), but once you realize how it is done, it is simplicity itself.

You’ll notice that on the Dashboard, there is a tab with the label Links. Oddly enough, that is NOT where you create a link to insert into your Post or Page. Instead, you do it right in the editing window. I talked about how to get to the editing window of a Page or a Post earlier. Once in the editing window, you will see a menu at the top of the main window where you write your text. This menu is just a long series of icons that you click on. In the top row, there are two icons that look like links in a chain (get it?). Hover your mouse over the first chain icon, and it will say “Insert/edit link (Alt+Shift+A). Hover your mouse over the second icon – the one that looks like a broken link in a chain (get it?) – and it will say “Unlink (Alt+Shift+S)”.

Like probably millions of newbies before me, I moved my cursor in my blog Post to where I wanted to insert a link and then clicked on the “Insert/edit link” icon and waited for something to happen. And nothing did. I clicked and clicked and clicked and still nothing happened. I did everything I could possibly think of in combination with clicking on those icons, and nothing continued to happen. Long searches through the WordPress Codex brought me no useful information.

By luck, I stumbled across someone in a forum somewhere who was facing the same problem. This person was saying that his link/unlink icons were greyed out, and I realized mine were greyed out, too. Being greyed out generally means that the feature is disabled or unavailable. I could click on those icons for eternity, and as long as they were greyed out, nothing was going to happen. I spent a long time trying to figure out how to turn on or enable this feature, but I couldn’t find anything. Then I stumbled across another bit of information in a forum and the light bulb finally went off: What you have to do is first SELECT some text in your blog and THEN click on the icon. This will transform that text into the link. Once I figured that out, I was all set to start creating links.

In retrospect, it’s easy to see why it was so difficult for me to understand what was going on. The feature and the icons all refer to “inserting” a link. I naturally treated it as I would any insert feature. I simply placed my cursor where I wanted to insert the link and then clicked on the icon. It’s the normal way. It would be more accurate to say that this WordPress feature transforms or changes something into a link. If I saw that type of language being used, then I would have been several steps closer to figuring it out. It’s similar to how I put those two words above into italics. I didn’t insert italics. I highlighted the words first, and then I clicked on the italics icon. I italicized the words. There is no equivalent word for links, but maybe one should be created. This process could be called “linkifying.” Select your text and then linkify it.

Another problem is that help and error messages are pretty thin on the ground in WordPress. In a more advanced interface, when I clicked on the insert link icon without selecting text first, it would give me a message saying something like “Please select some text first.” In WordPress, nothing happens. I get no feedback from the system and I have no clues to help me figure out what I’m doing wrong.

The upshot is twofold: First, figuring out how to insert a link into a Page or Post is not easy. Second, once you have figured it out, it’s simplicity itself. You just type some text and highlight it or highlight some existing text. It can be an entire sentence, one word, two words, whatever you want. While this text is highlighted, you click on the icon that looks like some links in a chain. Then you enter an URL or select what you want to link to from a dropdown menu.

The dropdown menu is not the most sophisticated in the world, but it works. It essentially presents you with one long list of all the content on your blog or website. You can scroll down through the list until you find the Post or Page you want to link to or you can find it through the search bar. Once you’ve found it, you just click on it. The system will add the appropriate URL to the window (the destination URL for this link) and you click on Add Link at the bottom. The text you’ve selected will turn blue and become a clickable link. In this window, you can also set whether this link opens in a new window/tab or the same window/tab.

It’s really easy to add links to your blog, and I can see using it a lot in the future. I think it can make a blog a lot more user-friendly. Dumbledore probably wishes making portkeys was this easy.

 

Taipei Rooftop Apartments & WordPress Custom Menu and Post Formats
Driving My Scooter in Taipei

Tags: , , , ,

Talk to me. I'd love to hear what you think.