Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
2 answers
4k views

Is there a hook / action that is triggered when adding or removing a post thumbnail?

I'm trying to update a custom field after a post thumbnail (Featured Image) is either added or removed from a post. The aim of this is to keep track of whether a featured image has been added or ...
Rick Curran's user avatar
  • 1,076
33 votes
3 answers
36k views

Can I exclude a post by meta key using pre_get_posts function?

I see many people prefer to use pre_get_posts hook instead of query_posts. The code below works and shows all posts which have meta key "featured" function show_featured_posts ( $query ) { if ( $...
Carlisle's user avatar
  • 351
0 votes
3 answers
158 views

How to automate featured posts number? [duplicate]

Possible Duplicate: featuring old articles without messing up with the archive Let's say you have a category called "featured". and you use that to feature posts. And the theme you have has a ...
Average Joe's user avatar
  • 1,889