Lesson 7ª

 

 

 

 

 

   

 

Managing Categories

Although it is possible to add categories at any, it is usually best to try to think up and create a number of categories before you have a large number of posts. The reason for this is that if you decide to re-organize categories at a later stage when you may have hundreds of posts, if you need to place 50 of them into a new category you create, it can sometimes get awkward.

Some key things you ought to know about categories:

  • Posts can be placed into multiple Categories, when creating or editing posts you can select as many as you like
  • Categories can have sub-categories, you just assign a new category to a parent category
  • A Post that is in a sub-category is also in the parent category even if you don't explicitly select it
  • If you have a large number of posts with varied subjects, categories are are useful organizational tool. On the other hand, a small personal journal might suffice with monthly archives
  • If you delete a category with hundreds of posts in it, the posts are safe, they remain in their other categories. If they are not in any other categories, they get moved to the "Uncategorized" category.

worpress

Let's create a new category.

From the main menu on the Dashboard, click "Categories" under the "Posts" heading. You'll find yourself on the Categories management page.

 

wordpress

wordpressOn the left hand side of the screen you'll see the fields needed to add a new category, while on the right hand side of the screen you'll see a list of existing Categories. Just like with the Posts from the previous lessons, you are able to run your mouse over these and select "Delete" or "Edit". You'll see the category we created previously, and that it has one post.

To create a new Category we have to first enter a name for it. Enter a name.

The next field, "Category Slug", is what will be visible in the URL. It is usually all lowercase and contains only letters, numbers, and hyphens. For example if your category name is "Funny Jokes" your slug could be "funny-jokes" or just "jokes". The URL for "Funny Jokes" would appear http://yoursite.com/category/funny-jokes/ You can leave it blank if you want it to be generated automatically.

Next, in the drop down list, you can select a Category Parent if this new category will be a sub-category. In this case it won't, so leave it as "None".

Next, enter a brief description. Most Themes don't make use of this, but when the do, they'd present this description to a visitor who has clicked on a Category to see its contents.

Finally click the "Add Category" button and see the list on the right get updated. Repeat the process as many times as you like. Mouse over any of the created categories and click "Edit". You'll see the same fields presented as when adding a category.

You should now be comfortable with creating, editing and deleting categories for your blog. Now when create or edit a blog Post, you'll have these new Categories to select from.