Modifying The WordPress Thesis Themes Custom Categories Further

Most Blogging software creates categories, yet most people want to change the text that appears at the top from the ugly “From The Category Archives” to something different.

The WordPress Thesis Theme is no different and in my research I found there are a few different ways to accomplish this.

I started looking into accomplishing this after modifying one of my Drupal sites in a similar manner.

I found, Rae Hoffman’s site Sugarrae.com in my research and she had already outlined what needed to be done. Yet, in the examples I found the SEO issue I’ve always seen with database driven sites.

Below is the custom code that Rae had come up with, and it does work great. Yet, like anyone who likes to tinker I had to make a few modifications for better SEO purposes.

/* Custom Categories */
function custom_archive_info() {
if (is_category('apples')) {
?>

YOUR CUSTOM APPLES TEXT HERE

}
elseif (is_category(‘oranges’)) {
?>

YOUR CUSTOM ORANGES TEXT HERE

}
else
thesis_default_archive_info();
}
remove_action(‘thesis_hook_archive_info’, ‘thesis_default_archive_info’);
add_action(‘thesis_hook_archive_info’, ‘custom_archive_info’);

What I found was that once you went to page two of any of your categories, you ended up with the same body of text that appeared on the main category page.

By changing the code to this:

if (is_category('insert-your-category-here') && !is_paged())

It eliminated the text from being displayed on page two, three, etc…

… But then it reverted back to the original ugly “From The Category Archive:” By adding this to the code:

elseif (is_category() && is_paged()) {
?>


}

I was able to easily change what was displayed on page 2, 3 etc… Now instead of displaying “From the category archive:” I set mine to “Even More Great Posts On:”  While still not perfect it gets me a little closer to what I’d really like to see for the categories.

0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *