Chapter 8
In This Chapter
Setting up categories
Exploring permalinks
Discovering RSS options
Writing and editing posts and pages
Managing and moderating comments
WordPress is a powerful publishing tool, especially when you use the full range of options available. With the basic settings configured (which I show you how to do in Chapter 7), now is the time to go forth and blog! You can skip to the “Blog It!: Writing Your First Entry” section in this chapter and jump right in to creating new posts for your blog. Or you can stay right here and discover some of the options you can set to make your blog a bit more organized and logical from the get-go.
In WordPress, a category is what you determine to be the main topic of a blog post. Through the use of categories, you can file your blog posts into topics by subject. To improve your readers’ experiences in navigating through your blog, WordPress organizes posts by the categories you assign to them. Visitors can click the categories they’re interested in to see the blog posts you’ve written on those particular topics.
You should know ahead of time that the list of categories you set up is displayed on your blog in a few different places, including the following:
Subcategories (also known as category children) can further refine the main category topic by listing specific topics related to the main (parent) category. On your WordPress Dashboard, on the Manage Categories page, subcategories are listed directly below the main category. Here’s an example:
Upon installation, WordPress gives you one default category to get you started called Uncategorized. (See the Categories page shown in Figure 8-1.) That category name is pretty generic, so you’ll definitely want to change it to one that’s more specific to you. (On my blog, I changed it to Life in General. Although that name’s still a bit on the generic side, it doesn’t sound quite so … well, uncategorized.)
So how do you change the name of that default category? When you’re logged in to your WordPress Dashboard, just follow these steps:
The Categories page opens, containing all the tools you need to set up and edit category titles for your blog.
To change the Uncategorized category, click the word Uncategorized, and you go to the Edit Category page. See Figure 8-2.
The term slug refers to the word(s) used in the web address for the specific category. For example, the Books category has a web address of http://yourdomain.com/category/books
; if you change the slug to Books I Like, the web address is http://yourdomain.com/category/books-i-like
. (WordPress automatically inserts a dash between the slug words in the web address.)
If you want this category to be a main category, not a subcategory, choose None.
Use this description to remind yourself what your category is about. Some WordPress themes display the category description right on your site, too, which can be helpful for your visitors. (See Chapter 12 for more about themes.) You’ll know if your theme is coded in this way if your site displays the category description on the category page(s).
The information you just edited is saved, and the Categories page reloads, showing your new category name.
Today, tomorrow, next month, next year — as your blog grows in size and age, you’ll continue adding new categories to further define and archive the history of your blog posts. You aren’t limited in the number of categories and subcategories you can create in your blog.
Creating a new category is as easy as following these steps:
The Categories page opens.
See Figure 8-3.
Suppose that you want to create a category in which you file all your posts about the books you read. In the Name text box, type something like Books I Enjoy.
The slug creates the link to the category page that lists all the posts you’ve made in this category. If you leave this field blank, WordPress automatically creates a slug based on the category name. If the category is Books I Enjoy, WordPress automatically creates a category slug like this: http://yourdomain.com/category/books-i-enjoy
. If you want to shorten it, however, you can! Type books in the Category Slug text box, and the link to the category becomes this: http://yourdomain.com/category/books
.
Choose None if you want this new category to be a parent (or top-level) category. If you’d like this category to be a subcategory of another category, choose the category you want to be the parent of this one.
Some WordPress templates are set up to display the category description directly beneath the category name (see Chapter 12). Providing a description helps you to further define the category intent for your readers. The description can be as short or as long as you like.
That’s it! You’ve added a new category to your blog. Armed with this information, you can add an unlimited number of categories to your blog.
You can delete a category on your blog by hovering your mouse over the title of the category you want to delete. Then click the Delete link that appears below the category title.
Each WordPress blog post is assigned its own web page, and the address (or URL) of that page is called a permalink. Posts that you see in WordPress blogs usually put their permalinks in any of four areas:
Permalinks are meant to be permanent links to your blog posts (which is where the perma part of that word comes from, in case you’re wondering). Other bloggers can use a post permalink to refer to that particular blog post. So ideally, the permalink of a post never changes. WordPress creates the permalink automatically when you publish a new post.
By default, a blog-post permalink in WordPress looks like this:
http://yourdomain.com/?p=100/
The p
stands for post, and 100
is the ID assigned to the individual post. You can leave the permalinks in this format if you don’t mind letting WordPress associate each post with an ID number.
WordPress, however, lets you take your permalinks to the beauty salon for a bit of a makeover. I’ll bet you didn’t know that permalinks could be pretty, did you? They certainly can. Allow me to explain.
Pretty permalinks are links that are more pleasing to the eye than standard links and, ultimately, more pleasing to search-engine spiders. (See Bonus Chapter 1 at www.dummies.com/extras/wordpress for an explanation of why search engines like pretty permalinks.) Pretty permalinks look something like this:
http://yourdomain.com/2014/02/02/pretty-permalinks/
Break down that URL and you see the date when the post was made, in year/month/day format. You also see the topic of the post.
To choose how your permalinks look, click Permalinks in the Settings menu. The Permalink Settings page opens, as shown in Figure 8-4.
On this page, you find several options for creating permalinks:
http://yourdomain.com/?p=100
.http://yourdomain.com/2014/02/02/sample-post/
.http://yourdomain.com/2014/02/sample-post/
.http://yourdomain.com/archives/123
.http://lisasabin-wilson.com/wordpress-is-awesome
.To create a pretty-permalink structure, select the Post Name radio button; then click the Save Changes button at the bottom of the page.
A custom permalink structure is one that lets you define which variables you want to see in your permalinks by using the tags in Table 8-1.
Table 8-1 Custom Permalinks
Permalink Tag |
Results |
|
4-digit year (such as |
|
2-digit month (such as |
|
2-digit day (such as |
|
2-digit hour of the day (such as |
|
2-digit minute (such as |
|
2-digit second (such as |
|
Text — usually, the post name — separated by hyphens (such as |
|
The unique numerical ID of the post (such as |
|
The text of the category name that you filed the post in (such as |
|
The text of the post author’s name (such as |
If you want your permalink to show the year, month, day, category, and post name, select the Custom Structure radio button in the Permalink Settings page and type the following tags in the Custom Structure text box:
/%year%/%monthnum%/%day%/%category%/%postname%/
Under this permalink format, the link for a post made on February 2, 2014, called WordPress For Dummies and filed in the Books I Read category, would look like this:
http://yourdomain.com/2014/02/02/books-i-read/wordpress-for-dummies/
Don’t forget to click the Save Changes button at the bottom of the Permalink Settings page; otherwise your permalink changes aren’t saved!
After you set the format for the permalinks for your site by using any options other than the default, WordPress writes specific rules, or directives, to the .htaccess
file on your web server. The .htaccess
file in turn communicates to your web server how it should serve up the permalinks, according to the permalink structure you’ve chosen to use. To use an .htaccess
file, you need to know the answers to two questions:
.htaccess
file?mod_rewrite
module?If you don’t know the answers, contact your hosting provider to find out.
If the answer to both questions is yes, continue with the following steps. If the answer is no, skip to the “Working with servers that don’t use Apache mod_rewrite” sidebar, later in this chapter.
You and WordPress work together in glorious harmony to create the .htaccess
file that lets you use a pretty-permalink structure in your blog. The file works like this:
.htaccess
file on your web server or create one and put it there.
If .htaccess
already exists, you can find it in the root of your directory on your web server — that is, the same directory where you find your wp-config.php
file. If you don’t see it in the root directory, try changing the options of your FTP client to show hidden files. (Because the .htaccess
file starts with a period [.
], it may not be visible until you configure your FTP client to show hidden files.)
If you need to create the file and put it on your web server, follow these steps:
htaccess.txt
.htaccess.txt
to your web server via FTP. (See Chapter 6 for more information about FTP.).htaccess
(notice the period at the beginning), and make sure that it is writable by the server by changing permissions to either 755 or 777. (See Chapter 6 for information on changing permissions on server files.)WordPress inserts into the .htaccess
file the specific rules necessary for making the permalink structure functional in your blog.
If you followed these steps correctly, you have an .htaccess
file on your web server that has the correct permissions set so that WordPress can write the correct rules to it. Your pretty-permalink structure works flawlessly. Kudos!
If you open the .htaccess
file and look at it now, you’ll see that it’s no longer blank. It should have a set of code in it called rewrite rules, which looks something like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
In Chapter 2, you can read about RSS feed technology and why it’s an important part of publishing your blog. Allow me to quote myself from that chapter: For your blog readers to stay updated with the latest and greatest content you post to your site, they need to subscribe to your RSS feed.
RSS feeds come in different flavors, including RSS 0.92, RDF/RSS 1.0, RSS 2.0, and Atom. The differences among them lie within the base code that makes up the functionality of the syndication feed. What’s important is that WordPress supports all versions of RSS — which means that anyone can subscribe to your RSS feed with any type of feed reader available.
I mention many times throughout this book that WordPress is very intuitive, and this section on RSS feeds is a shining example of a feature that WordPress automates. WordPress has a built-in feed generator that works behind the scenes to create feeds for you. This feed generator creates feeds from your posts, comments, and even categories.
The RSS feed for your blog posts is autodiscoverable, which means that almost all RSS feed readers and most browsers (Firefox, Chrome, Internet Explorer 7-9, and Safari, for example) automatically detect the RSS feed URL for a WordPress blog. Table 8-2 gives you some good guidelines on how to find the RSS feed URLs for the different sections of your blog.
Table 8-2 URLs for Built-In WordPress Feeds
Feed Type |
Example Feed URL |
RSS 0.92 |
|
RDF/RSS 1.0 |
|
RSS 2.0 |
|
Atom |
|
Comments RSS |
|
Category RSS |
|
http://yourdomain.com/feed
— your main RSS feedhttp://yourdomain.com/comments/feed
— your comments RSS feedhttp://yourdomain.com/category/cat-name/feed
— RSS feed for a categoryTry it with any URL on your site. Add /feed
at the end and you’ll have the RSS feed for that page.
RSS feeds are important parts of delivering content from your blog to your readers. RSS feeds are expected these days, so the fact that WordPress has taken care of everything for you — WordPress provides the feeds for you, is compliant with all RSS formats, and offers so many internal feeds — gives the software a huge advantage over any of the other blog-software platforms.
It’s finally time to write your first post in your new WordPress blog! The topic you choose to write about and the writing techniques you use to get your message across are all on you; I have my hands full writing this book! I can tell you, however, how to write the wonderful passages that can bring you blog fame. Ready?
Composing a blog post is a lot like typing an e-mail: You give it a title, you write the message, and you click a button to send your words into the world.
Follow these steps to write a basic blog post:
The Add New Post page opens, as shown in Figure 8-5.
You can use the Visual Text Editor to format the text in your post. I explain the Visual Text Editor and the buttons and options after these steps.
The page refreshes with your post title and content saved but not yet published to your blog.
By default, the area in which you write your post is in Visual Editing mode, as indicated by the Visual tab that appears above the text. Visual Editing mode is how WordPress provides WYSIWYG (What You See Is What You Get) options for formatting. Rather than have to embed HTML code in your post, you can simply type your post, highlight the text you want to format, and click the buttons (shown in Figure 8-5) that appear above the text box.
If you’ve ever used a word processing program, such as Microsoft Word, you’ll recognize many of these buttons:
<strong></strong>
HTML tag to emphasize the text in bold. Example: Bold Text.<em></em>
HTML tag to emphasize the text in italics. Example: Italic Text.<strike></strike>
HTML tag that puts a line through your text. Example: Strikethrough Text
.<ul><li></li></ul>
HTML tags that create an unordered, or bulleted, list.<ol><li></li></ol>
HTML tags that create an ordered, or numbered, list.<blockquote></blockquote>
HTML tag that indents the paragraph or section of text you’ve selected.<p align="left"></p>
HTML tag that lines up the selected text against the left margin.<p align="center"></p>
HTML tag that positions the selected text in the center of the page.<p align="right"></p>
HTML tag that lines up the selected text against the right margin.<a href=" "></a>
HTML tag around the text you’ve selected to create a hyperlink.<!--more-->
tag, which lets you split the display on your blog page. It publishes the text written above this tag with a Read More link, which takes the user to a page with the full post. This feature is good for really long posts.<p></p>
HTML tags around the text to indicate paragraph breaks.<address></address>
HTML tags around the text to indicate the contact information for author or owner of a document.<pre></pre>
HTML tags around the text to indicate preformatted text and preserves both spaces and line breaks.<H1>
</H1>
around text to indicate HTML headings (H1 defines the largest, H6 defines the smallest; heading formats are usually defined in the CSS [see Chapter 13] with font size and/or colors).<u></u>
HTML tags around the text to display it as underlined.<p style="text-align: justify">
</p>
HTML tag that lines up the selected text evenly between the left and right margins.You can turn off the Visual Text Editor by clicking the Your Profile link on the Users menu. Deselect the Use the Visual Editor When Writing box to turn off this editor if you’d rather insert the HTML code yourself in your posts.
At this point, you can skip to the “Publishing your post” section of this chapter for information on publishing your post to your blog, or continue with the following sections to discover how to refine the options for your post.
Directly above and to the left of the Visual Text Editor row of buttons is an Add Media area with a row of four icons. These icons let you insert images/photos, photo galleries, videos, and audio files into your posts. WordPress has an entire Media Library capability, which I describe in detail in Chapter 9.
After you write the post, you can choose a few extra options before you publish it for the entire world to see. These settings apply to the post you’re currently working on — not to any future or past posts. You can find these options below and to the right of the post text box (see Figure 8-6). Click the title of each option, and the settings for that specific option expand.
If you do not see these options on the Add New Post page on your Dashboard, that most likely means you have not enabled them in the Screen Options (discussed in Chapter 7). Click the Screen Options tab at the top of the Add New Post page and enable the modules on this page that you would like to use.
Here are the options found underneath the post text box:
Here are the options found to the right of the post text box:
Cats
, Kittens
, Felines
represent three different tags, for example, but without the commas, WordPress would consider those three words to be one tag. Click the Add button to add the tags to your post. See the “What are tags, and how/why do I use them?” sidebar earlier in this chapter for more information on tags.You have given your new post a title and have written the content of your new blog post. Maybe you’ve even added an image or other type of media file to your blog post (see Chapter 9) and have configured the tags, categories, and other options. Now the question is, Publish? Or not publish (yet)?
WordPress gives you three options for saving or publishing your post when you’re done writing it. The Publish module is located on the right side of the Add New (or Edit) Post page. Just click the title of the Publish module to expand the settings you need. Figure 8-7 shows the available options in the Publish module.
The Publish module has several options:
Click OK to save your settings.
This is otherwise known as a sticky post. Typically posts are displayed in chronological order on your blog, displaying the most recent post on top. If you make a post sticky, it remains at the very top no matter how many other posts you make after it. When you want to unstick the post, deselect the Stick This Post to the Front Page check box.
If you’d like to future-publish this post, you can set the time and date for any time in the future. This feature has come in handy for me many times. For example, when I have a vacation planned and I don’t want my blog to go without updates while I’m gone, I’ll sit down and write a few posts and set the date for a time in the future. They’re published to my blog while I’m somewhere tropical, diving with the fishes.
After you choose an option from the drop-down menu, click the Save button. The Add New Post page saves your publishing-status option.
While I write this book, I have editors looking over my shoulder, making recommendations, correcting my typos and grammatical errors, and helping me by telling me when I get too long-winded.
You, on the other hand, are not so lucky! You are your own editor and have full control of what you write, when you write it, and how you write it. You can always go back and edit previous posts to correct typos, grammatical errors, and other mistakes by following these steps:
The Posts page opens and lists the 20 most recent posts you’ve made to your blog.
You can filter that listing of posts by date from the Show All Dates drop-down menu at the top of the Posts page. For example, if you choose February 2014, the Posts page reloads, displaying only those posts that were published in the month of February 2014.
You can also filter the post listing by category. Select your desired category from the View All Categories drop-down menu.
The Edit Post window opens. In this window, you can edit the post and/or any of its options.
You can also click the Edit link that appears beneath the post title on the Posts page.
If you need to edit only the post options, click the Quick Edit link. The post options open, and you can configure post options such as the title, status, password, categories, tags, comments, and time stamp. Click the Save button to save your changes without ever leaving the Post page on your Dashboard.
The Edit Post window refreshes with all your changes saved.
The feature that really catapulted blogging into the limelight is the comments feature, which lets visitors interact with the authors of blogs. I cover the concept of blog comments and trackbacks in Chapter 2. They provide a great way for readers to interact with site owners, and vice versa.
To find your comments, click the Comments link on the Dashboard navigation menu; the Comments page opens. See Figure 8-8.
When you hover your mouse pointer over your comments, several links appear that give you the opportunity to manage those comments:
If you have your options set so that comments aren’t published to your blog until you approve them, you can approve comments from the Comments page as well. Just click the Pending link on the Comments page and you go to the Edit Comments page. If you have comments and/or trackbacks awaiting moderation, you see them on this page and you can approve them, mark them as spam, or delete them.
A nice feature of WordPress is that it immediately notifies you of any comments sitting in the moderation queue, awaiting your action. This notification appears as a small circle to the right of the Comments menu in the left navigation menu on every single page. Figure 8-10 shows my Dashboard page with an indicator in the Comments menu that I have 1 comment awaiting moderation.
I touch on Akismet a few times throughout this book because it’s my humble opinion that Akismet is the mother of all plugins and that no WordPress blog is complete without a fully activated version of Akismet running in it.
Apparently WordPress agrees, because the plugin is packaged in every WordPress software release beginning with version 2.0. Akismet was created by the folks at Automattic — the same folks who brought you the WordPress.com-hosted version (discussed in Part II of this book). Automattic also works with some of the original developers of the WordPress software platform.
Akismet is the answer to combatting comment and trackback spam. Matt Mullenweg of Automattic says that Akismet is a “collaborative effort to make comment and trackback spam a non-issue and restore innocence to blogging, so you never have to worry about spam again” (from the Akismet website at http://akismet.com).
I’ve been blogging since 2002. I started blogging with the Movable Type blogging platform and moved to WordPress in 2003. As blogging became more and more popular, comment and trackback spam became more and more of a nuisance. One morning in 2004, I found that 2,300 pieces of disgusting comment spam had been published to my blog. Something had to be done! The folks at Automattic did a fine thing with Akismet. Since the emergence of Akismet, I’ve barely had to think about comment or trackback spam except for the few times a month I check my Akismet spam queue.
I talk in greater detail about plugin use in WordPress in Chapter 10, where you find out how to activate Akismet and make sure that it’s protecting your blog from trackback and comment spam.
18.117.186.153