0

From time to time, I feature posts from the archives. Sometimes, I need to feature items 2 3 years back.

In order to feature such posts, I simply categorized them into the featured category and once I am done featuring them, I unchecked them from the featured cat so I can have the room to feature new ones.

This approach has multiple drawbacks.

Firstly, I cannot simply go pick a post and then categorize it under featured and expect it to be appear on my featured zone!. I MUST UNCHECK AT LEAST ONE OF THE EXISTING FEATURED POSTS. Why? Well, if I got room to display 5 featured items, and I happen to just feature a 6th one. which 5 is to show in there?

Secondly, due to the unchecking, I can never build an archive of 'once featured' or 'at least once featured' list of posts.

It seems to me that WordPress make a one heck of an assumption that featured posts come from the latest posts! So, As you bring new posts in it, you can simply keep on checking them into the featured posts, and WP will nicely show them in your featured items zone in the chronological order. This obviously kicks the 6th one out of the view, keeping the latest 5 in the zone.

But, what if you pick one old post (from say 3 mts ago && you want that to appear in that very same zone? Change the post date?

Let me quickly note here that the Sticky posts feature of WP won't help here neither, cause they too require the maintenance of 'unsticking'. Sticks posts may help with the situation for one Zs and two Zs but if you constantly feature items from the past, it won't help at all.

I wish there was a special category, called FEATURED with an option to change the base name whereby WP manages the featured items using a a different date based criteria.

So, Everytime an item is checked into that special featured WP category, WP keeps track of the date of this action into a database field, called last featured date or something like that and when it displays the items in the featured cat ( and all of its sub cats ), it simply sort posts using that date - instead of the post_created date!

My question to you is that if there are slick solutions out there to address this problem?

What would you guys do to keep the last 5 featured items by simply clicking items into featured category and not doing anything else?

1
  • This is not a problem with WordPress itself, since it doesn't ship with any "featured posts" functionality out of the box (except for sticky), so I guess your theme's author has built it and you're having trouble dealing with what he/she built. Now, there are solutions for that, but they depend on how your theme deals with the featured posts. If you care to link to your site or give any more info, that'll be useful to help you out.
    – moraleida
    Commented Jun 11, 2012 at 13:21

2 Answers 2

1

as moraleida mentions, your setup is a custom implementation specific to your theme, not native to WordPress.

rather than use a category, I would use post metadata to designate posts as featured. I would additionally create a custom meta box to designate the post as featured, that way, on the back end, I can store when that post was made a featured post. then it's simply a matter of doing a meta query to retrieve the posts with the most recent dates.

0

If you never plan to modify your featured posts after they are declared featured posts, you could use the_modified_date to order them. If you want more posts to appear, just change the numberposts parameter in get_posts (which I assume you're using).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.