The Science of Web Art, Design and Development

View posts for » Category "Wordpress"

Categorizing Pages and Posts in Wordpress

Having authored a plugin to display sub categories on wordpress, I’m often faced with users that realize they can’t use categories on pages, and they turn to me to explain how can be done. This post is meant to help all these people that want to learn why they can’t use categories on pages and, show you that this doesn’t mean you can’t categorize pages at all.

Pages and subpages

Parent pages and layoutsIn a conventional CMS, pages within a web site are classified in sections and subsections. Each section tipically contain a description of what the section is about and links to its subsections and pages.

Each CMS has its own way to do it and often its own jargon but, ultimately, it is the same philosophy.

Wordpress is not different in this respect. If you want to use it to run a regular (non-blog) web-site, you can.

Wordpress has a feature called pages, which are very similar to posts in many aspects, but they differ, essentially, in the fact that there is no chronology associated to it, pretty much like traditional web pages.

In order to run a non-blog website with Wordpress, you’ll rely on pages, rather than posts, to publish your content, and this also means that the publish date of this content will be much less important than in a blog, if important at all.

That might be good enough for a small site with half a dozen pages, but what if you have slightly bigger ambitions and you need to categorize your content?

Time for an example

Say you run a cooking site (not blog!) and you need the following pages/sections: Recipes, Desserts, Nutritional facts and an About page.

Food Menu

In Wordpress, the way to do it is to create a page for each one. Each page in Wordpress can have a parent page and all pages can be parents as well. These will be the topmost pages, so they have no parent but some of these pages will also work as sections by being parents of other pages.

For the rest of the content, each time you publish a recipe, you will create a page for it, and you will set the main recipes page as a parent. In this way, all recipes are sub pages of the recipes page, and the recipes page immediately becomes a category, as much as a page.

The same goes for the recipes and nutritional facts, but let’s give a bit of attention to the about page.

Although the about page will be categorized as a root page and be on the same level than the main categories, the about page can merely be a plain a simple page with no children.

Because of the way pages are categorized as sub-pages of other pages, you don’t have to distinguish sections from regular pages. In addition, if one day you want to add sections the the about page (eg, about the authors, our history, etc) you can simply create the pages and set the about page as parent.

Thanks to the ability to create different page templates, you can even style each section or page differently.

Posts and categories

Post Categories in WordpressFor a person with a background stronger in blogs than in static websites, categories might seem missing for pages on Wordpress, but actually is the other way around. For someone coming from a static sites background, the problem might seem to be quite the opposite.

The only basic difference between pages in static sites and posts in a blog is that posts follow a chronological sequence, while pages just sit there and the sequence in which they were written is not quite important.

Although this is the only remarkable difference, this radically changes the way authors and readers approach to each kind of website, and consequently the features a CMS needs to implement for each one.

For instance, blogs are meant to be followed over time. The latest information is supposed to be the most important at a given time and that is why posts are presented in reverse chronological order. It shouldn’t have to be like this, but is quite convenient.

Now, having said that, this doesn’t imply that older posts aren’t useful, and they should be made available in and presented in an organized way. But because the chronological factor, a blog has a few extra challenges on the organization subject.

  • Usually, much more content is created for a blog than for a static site
  • With the continuous addition of new content, classifications can grow obsolete pretty quicly
  • New sections may be needed and accommodate them must be made easy
  • Posts might belong to more than one section as time goes by

Regarding a section of pages as a page on itself does make sense, but a post section being regarded as a post makes no sense at all. I explain:

A post is characterized as such by its chronological aspect while categories’ creation date on themselves usually have no importance at all. Hence, there is no sense in regarding a category as a post. Actually, if you come to think of it, this paragraph is almost unnecessary as this though is pretty much counter-intuitive.

Enter categories!

Categories are simply a name you can create and you can relate posts with, pretty much as parent pages.

And similarities don’t stop there. A category might have a parent category, just like pages.

Also, you might not be aware, but Wordpress allow you to create different pages for displaying each category, so if you have a limited number of them or if you want to highlight some, you can actually style a template that work as parent page in most aspects. But this is out of the scope of this post and in material for a future discussion.

Comments (6)

Tutorial: A category based archive on Wordpress

I followed Lorelle’s advice advice and added a category based archive on Zo’C’s archive page, and now I’m going to tell you how to create yours.

At the end of this post, you’ll find the complete code in a single piece.

Step 1: Create the template file and find the content area

The first thing to do is create a new template page for your theme. The easiest way to do it is by duplicating your default page template which is the file “page.php”. Login via FTP, SSH or your favorite method an copy that file to “category_archive.php” and start editing.

Edit your file so at the very beginning it has the following lines, they are responsible for telling Wordpress this is a template page and its name.

<?php
/*
Template Name: CategoryArchive
*/
?>

The reason why we copied the default page instead of starting from the scratch is that any theme has is peculiarities (footer, sidebar, header, this and that) and we want to preserve them all, we just want to change the content. So, now, you must find the content.

read full post…

Comments (28)

Video tutorials on how to configure the Powerblogroll Plugin

Since I published the Zo’C powerblogroll plugin, I have received a lot of feedback from users who’d like to use the plugin but they are discouraged by the fact that you need to deal with PHP code, even if it is in a very small amount.

I’m willing to release a new, much more user friendly, version. But while this doesn’t happen, I’ve recorded two videos showing how to install and configure the plugin.

In the video, I use the One Click Install plugin that is a great one and I strongly recommend. If you don’t want to use it, however, you’ll have to use the normal FTP method as with any other plugin.

Installing, activating, and using the plugin from your theme

(video will open in a new window)

Episode 1 - Installing ZoC Powerblogroll

Adding links to Wordpress

In case you don’t know how to fill all the information that your Powerbloroll can display (such as the favicon, description, notes, RSS, etc.) this video shows you how to do it.

(video will open in a new window)

Episode 2 - Adding Links to Wordpress

Comments (0)

A powerful Archive Page for your wordpress blog

Tired of that old Archive page that displays the months in which you have posts? Even worse, tired of that bulk on your sidebar?

If you come to think of it, it is probably helping your visitors very little, unless they are looking for a specific post and have a rather good idea of when it was published. But if they do know that much, they are more likely to use the search box instead.

read full post…

Comments (24)

Wordpress plugin to display names, favicons, description, notes and even the feed on your blogroll

Blogroll Admin PanelSome time ago I was looking for a plugin that showed both favicon and name on a Wordpress blogroll. As I couldn’t find it, I had to made my own, but the code wasn’t general enough to distribute it.

Recently I have created a powerful blogroll, in the form of a page template, capable to display the name, favicon, description, notes and even the RSS link of blogs in your blogroll, because blogrolls with just a list of links are not useful anymore.

Now I have packaged it as a plugin for your delight: The ZoC Powerblogroll.

Download it right away, or go to the plugin page.

Download It

(Comments are disabled on this page, you can discuss this on the plugin page.)

This plugin has been downloaded 3121 times.

Comments (2)

Subcats, a wordpress plugin to display subcategories

Subcats SnapI have just published Zo’C Subcats, a wordpress plugin that enables you to display either a list or a drop down menu with the subcategories of a category of your choice. The plugin gracefully degrades in absence of Javascript.

You can read further instructions and download it on the plugin page or you can download it immediately here.

The plugin started humbly to address a need of my fellow blogger Desty, and was published thanks to the incentive of Michael and Jen.

Any feedback is welcome :-)

Enjoy!

(Comments are disabled on this page, you can discuss this on the plugin page.)

This plugin has been downloaded 311 times.

Comments (2)

Dofollow Vs. Nofollow comments - fighting spam and rewarding commenters

Akismet Stats in 2007-09-16There has been a great fuzz lately about the Nofollow attribute on links and I think every publisher of new media (bloggers and alike) should take a stand either against or in favor of this discussion.

I took mine and I have disabled nofollow on this blog, but before I get on the discussion, let me first overview what the nofollow atribute is.

read full post…

Comments (13)

Testdriving “Comment-Policy” Wordpress plugin

Trying to increase the quality of service of the Zo’C blog and trying to reduce my effort to manage spam and approve comments quicky I’ve just instaled the Comment-Policy Wordpress plugin.

read full post…

Comments (0)

Powerblogging in Wordpress with great plugins

I decided to share a list of my favorite Wordpress plugins for those of you who might be interested, but before anything else, I want to encourage people to use Wordpress instead of Blogger.

There are many well regarded blogging platforms around that I don’t really know well, but I do know well blogger and wordpress and I certainly think that blogger is not nearly a serious platform as Wordpress is.

I won’t extend this subject on this post, you’ll have to trust me on this, but I do want to give three arguments in favor of wordpress.

read full post…

Comments (2)