Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)

(avery) #1

CHAPTER 6 • Advanced Theme Usage 167


Table 6-1 Accepted Parameters


Parameter Description

author Author ID
cat Numeric ID
tag Tag slug
keyword Search keywords
year The year (for example, 2014)
day The date (for example, 15)
monthnum The month by number (for example, 3 for March)
hour The hour (for example, 19)
minute The minute (for example, 45)
second The second (for example, 13)
p The post ID
paged A specific page relating to the front page post listing

BASIC SEO IMPLEMENTATIONS


Getting the most out of the search engines is a topic for a book in itself. The cold, harsh truth
is that the best SEO (search engine optimization) is manually edited on a per-post and
per-page basis, rather than automatically generated. However, there are some things you can
do in your theme from the start to get better SEO results.


Here are some tips to consider when setting up your theme:


◾ Validate: Valid code is better. You can check your code using the W3C Markup Validation
Service at http://validator.w3.org.
◾ Permalinks, obviously: Permalinks change those ID-based, ugly URLs to more user-
friendly (as well as search-engine-friendly) ones. The earlier keywords in your perma-
links get picked up first, so you should really get the post and page title slug in there (not
the ID), and possibly the category as well. Some claim that having date-based data in the
permalinks helps the search engines as well, and that may very well be true if the site is
updated often enough. The big bump, however, will be when you switch to permalinks, so
make that a must in every setup.
◾ Tags and keywords: Tagging your posts not only helps describe the content for your
readers, but it is also an opportunity to tell the search engines more about them. You can
use a plugin to populate the meta keywords field with your tags (not linked of course) or
something similar.
Free download pdf