[wp-hackers] Handling the featured tags

Haluk Karamete halukkaramete at gmail.com
Mon Jun 11 12:19:35 UTC 2012

Would an algorithm like this work?

At save/update post time,
     check the post's featured category status; by comparing its
before and after status
     if the before and after statuses ( as far as featured cat goes )
are the same, do nothing special.
     if the before status was unchecked, and the after status is
checked, then update a field ( WELL WHAT FIELD ? )

    How about post_date_gmt? Right from the wp_posts? What say you?

On Mon, Jun 11, 2012 at 4:41 AM, Mike Little <wordpress at zed1.com> wrote:
> On Mon, Jun 11, 2012 at 12:31 PM, Haluk Karamete <halukkaramete at gmail.com>wrote:
>> 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
>> 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?
> I've not heard of such a plugin, but you've just described a plugin that
> should only take a couple of hours for an experienced plugin writer to
> create.
> Mike
> --
> Mike Little
> http://zed1.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list