In order to track SEO metrics for my clients, I use the SEOMoz Pro service, which is a handy tool at monitoring SEO metrics (and so much more). I’ve noticed on one of the sites I manage through the service that I’ve been missing a number of meta description tags. For those unaware, meta description tags are used to give a brief and concise summary of content on a page. This helps search engines and potential readers understand what’s on the page. The meta description info is also often used in page summaries in search results from engines like Google. The below example is one from my music site, Electric Mohawk.
The example demonstrates the importance of meta description tags in SEO quite clearly. I noticed, though, that some of my pages on Electric Mohawk are turning up as missing meta description info in their tags. A prime example for my site is archive pages. My sites are typically built using WordPress, so archive pages are dynamically generated and compiled, usually based on the month content was published.
I typically do not make my archive pages searchable for SEO purposes, but some people may still want them archived and may still want them to include a basic description. The problem is, though, that many of us already use an SEO plugin of some sort, particularly All-in-One SEO Pack, where users do not get direct access to creating meta description tags for certain dynamically generated pages (any kind of archive page or page-navi generated page). Another issue is that by creating another meta description tag to compensate for this in the header.php file would cause duplicate description tags to be created if the content is not an archive page. I’ve created a simple workaround for WordPress archive pages to solve this problem.
Add this piece of code to your theme’s header.php file:
What this code is doing is simple. The if statement checks whether or not the page is an archive page. If it is an archive page, then it will echo out a portion of the meta description html tag. In between, I made a call to the_time() function that passes in the month and year. I then created another echo that gives the actual description.
Some of you may be wondering why there are two echo statements instead of a simple string concatenation. While I was debugging and testing out this code, the date would appear before the initial HTML tag, causing problems with formatting and validation. Creating a second echo seemed to solve the problem. Also, if the statement evaluates false, no additional tags will be generated.
I hope this snippet helps you out in some way. Have an alternative? Feel free to share!
With Electric Mohawk, my music blog, I receive a lot of daily press releases from PR agencies. Unsure of how I wanted to deliver this content to the site, I finally decided on creating a category page on the blog that showcases these releases. Problem solved, right? Well, not entirely.
After thinking about it more, I didn’t want my blog’s main feed getting filled with a ton (at least 10) press releases everyday, as I would like the home page to focus on other content.
In my time, I’ve learned that WordPress can do some pretty awesome things, like custom filters.
Here’s how I filtered out my “Press Releases” category from Electric Mohawk:
Want this snippet in plain text? Here: Filter categories snippet a la text.
This code snippet should be placed in your functions.php file located in your theme’s folder.
Here’s a breakdown of how the code works:
What the code is doing is initially creating a filter function that excludes a category based on its ID number. First, you’re checking for the blog page. is_home() applies to the blog page at large, even if it is not your home page, per se (for more information, do a comparison of is_home() and is_front_page()).
Next, you’re going to assign the $query variable (property of the WP_Query class) the filter value using the set (key, value) method, where the key is the category (cat), and the value is your category ID (an integer). In my situation, my category’s ID that I wanted to filter out was 611. The reason why the value is negative is because we want to remove the category. After that, the $query variable is returned.
Finally, you’ll want to add the filter. You want this filter to be applied before WordPress fetches the posts from the database, so I used the pre_get_posts hook that’s built into WordPress.
That’s about it. Remember, this snippet should get added to the functions.php file located in your theme’s folder.
Questions? Leave them in the comments. Your questions are always welcome here.
FoxyPress, a WordPress plugin that integrates the FoxyCart E-commerce system into the popular CMS, has now launched a demo store where visitors can test out the plugin real-time.
A few things to consider when testing out the plugin:

FoxyPress 0.3.4 rolled out today, which adds some new features, improvements, and bug fixes.
WebMovement, LLC has come a long way with the development of their plugin that integrates the FoxyCart e-Commerce system with WordPress. The latest release adds a ton of features as well as user customizations that make product pages more SEO friendly.
Here are some of the new features released in 0.3.3
On a sort of unrelated note, a new site design has been launched in celebration of the new release. See the screen shot above or check out the FoxyPress redesign firsthand.
Want to learn more about the update and new features? Check out the updated Features, Getting Started, and FAQ sections.