This is our third and last post on enhancing the categories in our twenty eleven child theme, so we now have three different solutions, this one is extended as it is more rich in features.
We wanted to be able to choose a header from a list, add a nice description in the editor not just the description area, have a selectable choice per category of how the content is displayed and reverse the sort order.
Child theme one, this theme will use the header image for the oldest post that has an image of the right size.
Child theme two, this theme will use an uploaded image that has the same name as the Category Slug
Well that is quite a list lets look at each one and give a brief idea of what we have done to achieve it.
Choose a Header
We have taken the code from solution two and made this into a dropdown list, so the admin can choose any uploaded header for the category.
A Nice Description
We decided on a custom post type called ‘Category Description’, the reason for this is because we have all the editor options, fonts, lists, images, almost anything we can do in a normal post.
Content Display
Normal content full posts, excepts only for a list view, and excerpts and thumbnails for a list view with the standard thumbnail
Reverse Sort
By default the newest content rises to the top, but what if your category needs to be read oldest to newest, we have added a checkbox to sort ‘ASC’
Category Headers
These we upload from the Admin > Appearance > Headers, we have uploaded, chosen a crop and WordPress has cropped three images in this screenshot, if we do not upload any we cannot have specific headers for our categories.
Category Descriptions
Here we can see our custom post types, we can also see that we can now use the full editor bar options.
Adding Categories
We need to add some categories, here we have created one called featured, and added seven posts to it.
We will not see the descriptions or the new input fields we created for our Category until we choose to Edit.
There are our four new input areas, lets select some values and update the Category.
We will have to choose edit again as WordPress returns us to the list view!
Pretty nice as we can see we have chosen the ‘Jellyfish’ header, the ‘Featured’ description, Excerpts and Thumbnails, and a reverse sort order.
Category Page
Now we can have a look at our category page changes, from the site we navigate to the Category called featured, and load the page.
There we will see our Header Image, Category Description, the description will only show on the first list page, there are posts under the description.
If we select to see previous posts from under the posts we will see the description will not show, from the image we can see the thumbnails and excerpts, and the reverse sorting, giving us three and four with the newest post being last.
That’s all for our Category Enhancements, drop by again!
Notices
We do require your feedback to improve our themes and tutorials, please leave your comments good or bad.
Code disclaimer information
If this document contains programming examples, www.DigitalRaindrops.net grants you a nonexclusive copyright license to use all programming code from which you can generate similar functions tailored to your own specific needs.
All sample code is provided by http://DigitalRaindrops.net for learning illustrative purposes only.
These examples have not been thoroughly tested under all conditions. www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, or function of these examples.
All programs contained herein are provided to you “AS IS” without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.
Membership
Registration and Membership is no longer required for downloading files or interacting with Digital Raindrops, posting a comment or topic in the forum does use Captcha to reduce spammers.
This website is a tool to support and promote WordPress and Artisteer theme development, please support, share and give credit for any benefits you gain from the tutorials on this website.













