How to change featured content to a different tag in WordPress Twenty Fourteen?

The internal implementation details of that feature are of questionable sanity.

  1. If you take a look at said featured-content.php template you would see
  2. that it get posts from twentyfourteen_get_featured_posts() however
  3. the only thing that function has is twentyfourteen_get_featured_posts filter
  4. from quick look at which in peculiar fashion nothing is actually getting hooked
  5. because twentyfourteen_setup() declares featured-content feature
  6. with configuration defining featured_content_filter as the one above
  7. to which Featured_Content class hooks its get_featured_posts() method
  8. which burrows further to get_featured_posts_ids() method
  9. which calculates, caches, and returns those IDs

So there are a… few points at which you can work with… this. 🙂

From practical point of view you would probably want to hook into twentyfourteen_get_featured_posts filter and conditionally return different set of posts as you need.

Leave a Comment