Featured Content: add a new parameter to Featured Content to allow users to include Featured Posts in the main blog query
|Reported by:||jeherve||Owned by:|
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, ) );
Change History (6)
2 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed