WordPress.org

Plugin Directory

jetpack

Opened 4 years ago

Closed 3 years ago

#1834 closed enhancement (duplicate)

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: tmoorewp
Priority: normal Severity: normal
Plugin: jetpack Keywords: featured-content has-patch
Cc: jeherve, richard@…

Description

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)

1834.diff (1.2 KB) - added by jeherve 4 years 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)

@jeherve4 years ago

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

comment:1 @jeherve4 years ago

It seems that Featured Content will be included in Core:

I consequently created a new ticket in core.trac for this feature request:

comment:2 @richardmtl4 years ago

  • Cc richard@… added

comment:3 @richardmtl4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

comment:4 @kwight3 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Reopening, as FC is on hold for core.

Added a PR for this as a user setting: https://github.com/Automattic/jetpack/pull/948

comment:5 @jeherve3 years ago

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

@kwight Since we do all our development on GitHub nowadays, I'm going to close this ticket in favor of https://github.com/Automattic/jetpack/pull/948

Don't hesitate to ping me if you have questions!

Note: See TracTickets for help on using tickets.