WordPress.org

Make WordPress Core

#24876 closed feature request (invalid)

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:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Themes Keywords: has-patch dev-feedback
Focuses: Cc:

Description

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,
) );

Attachments (1)

24876.diff (1.2 KB) - added by jeherve 22 months ago.
Featured Content: add a new parameter to Featured Content to allow users to include Featured Posts in the main blog query

Download all attachments as: .zip

Change History (6)

@jeherve22 months ago

Featured Content: add a new parameter to Featured Content to allow users to include Featured Posts in the main blog query

comment:1 follow-up: @obenland22 months ago

  • Cc mfields added

I talked with mfields about this during WordCamp Portland. He suggested to have featured posts excluded when the front page is dynamic, and have them included when it's a static page. What do you think?

comment:2 in reply to: ↑ 1 @jeherve22 months ago

Replying to obenland:

He suggested to have featured posts excluded when the front page is dynamic, and have them included when it's a static page. What do you think?

That would make sense, indeed. I would still offer an option to overwrite the default behaviour when adding theme support, though.

comment:3 @SergeyBiryukov18 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

comment:4 @Astriker17 months ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Was anything ever put into Wordpress to allow featured posts to not be excluded?

comment:5 @Ipstenu17 months ago

  • Resolution set to invalid
  • Status changed from reopened to closed

No, it was not, however the project is on hold.

This was moved to the theme itself. Please read the link Sergey provided. The Featured Content proposal, as a part of core vis a vis a plugin, has been refactored due to many issues.

http://make.wordpress.org/core/2013/11/12/featured-content-epilogue/

Note: See TracTickets for help on using tickets.