Viewing 1 replies (of 1 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    It makes it what I like to call: child-theme-friendly

    It creates a filter that you can hook to in order to use your own posts as ‘featured-content’ rather than the default setting.

    How you would use it in a child theme is:

    add_filter( 'twentyfourteen_get_featured_posts', 'my_featured_posts' );
    function my_featured_posts( $array ){
      $array = get_posts( /* what you are looking for to feature */ );
      return $array;
    }

Viewing 1 replies (of 1 total)
  • The topic ‘What does this line of code do?’ is closed to new replies.