Here is how you can add some content on your categories pages and give them some SEO bost.
Since this is a 5 min recipe we will not bother with content editing and we will use what wordpress already have .
- Go to Categories, pick the one you change and click the edit link
- Post your content in a html format in the Description textarea and save.
Now, we have the content stored into database but we want it displayed on front pages. Open archive.php from your theme’s folder and let’s start editing a bit.
Add this line after the if (have_posts()) :
$content= category_description();
// this will store in content the description we just posted.
And just print the content : echo $content; immediately after that.
Too make things more interesting. I use a tag similar with <!--nextpage--> in the category description.
The text before this tag will be displayed before the post list from that category. The text after will be posted after the list. I usually use a tag like this one <!--postlist-->.
And the code looks like this
$content= category_description();
$bomb='<!-- postlist -->';
$pieces=explode($bomb,$content);
After the if (have_posts()) : we print the first piece
print $pieces[0];
And after the while block (the one that shows the post list) we display the second part of our description
print $pieces[1];
And voila, our category page has become a real hub page. Make sure that is indexable by search engines and links are with do follow. If you want Google to consider category pages relevant for a specific term this is the first step.
