[wp-trac] [WordPress Trac] #24876: Featured Content: add a new parameter to Featured Content to allow users to include Featured Posts in the main blog query

WordPress Trac noreply at wordpress.org
Mon Jul 29 14:21:02 UTC 2013


#24876: Featured Content: add a new parameter to Featured Content to allow users to
include Featured Posts in the main blog query
-----------------------------+------------------------------------
 Reporter:  jeherve          |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Themes           |    Version:  trunk
 Severity:  normal           |   Keywords:  has-patch dev-feedback
-----------------------------+------------------------------------
 Related ticket: #24857

 By default, Featured Content excludes the Featured Posts from the main
 blog query so these posts don't appear twice on the page.
 However, in some cases blog owners might want to include these posts, and
 not modify the original query on the page.

 In the attached patch, I have added a new parameter,
 {{{include_featured}}}, that defaults to {{{false}}}. If it is set to
 true, the function excluding the Featured Posts from the main query is not
 added.

 {{{
 add_theme_support( 'featured-content', array(
     'featured_content_filter' => 'mytheme_get_featured_posts',
     'max_posts'   => 6,
     'include_featured' => true,
 ) );
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24876>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list