Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#25330 closed defect (bug) (wontfix)

Twenty Fourteen: Filter the home page posts and remove post formatted posts that are visible in the ephemera widgets

Reported by: iamtakashi's profile iamtakashi Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords:
Focuses: Cc:


Currently, the last two formatted posts are removed from the main query because of the legacy from Further theme. We need to remove formatted posts dynamically by checking the ephemera widgets.

Related: #25028

Attachments (2)

25330.patch (3.5 KB) - added by Frank Klein 11 years ago.
This is a first stab at a patch. I'm not sure if this is the most clever way of doing it, so any feedback is appreciated.
25330.2.patch (3.5 KB) - added by Frank Klein 11 years ago.

Download all attachments as: .zip

Change History (15)

@Frank Klein
11 years ago

This is a first stab at a patch. I'm not sure if this is the most clever way of doing it, so any feedback is appreciated.

#1 @Frank Klein
11 years ago

  • Cc contact@… added
  • Keywords has-patch needs-testing added

#2 @obenland
11 years ago

  • Milestone changed from Awaiting Review to 3.8

#3 @Frank Klein
11 years ago

  • Cc contact@… removed

Updated patch with the following modifications:

  • Use get_posts() instead of a WP_Query
  • Make sure the IDs to exclude are unique via array_unique()
  • Add documentation
  • Formatting fixes

#4 @Frank Klein
11 years ago

  • Cc contact@… added

#5 @lancewillett
11 years ago

Is this tested and ready for commit?

#6 @kraftbj
11 years ago

The code works great.

A philosophical question though: Is the point to remove only the post-formatted posts actually visible on the page from the main stream, while leaving in older post-formatted posts that had "fallen off" the widget?

Using this on my site currently, I'd expect the main stream not to show the post-formatted posts if the widget for that post format exists at all.

What about changing up the function to, instead of excluding specific post IDs that are on display, we add a $query->set based on the formats present using the NOT IN operator, which would exclude all posts of a specific format if displays via the widget?

#7 @kraftbj
11 years ago

  • Cc bk@… added

#8 @lancewillett
11 years ago

#25519 was marked as a duplicate.

#9 @lancewillett
11 years ago

Discussing in today's office hours, we'd prefer to keep the functionality as proposed originally:

iamtakashi: I don't understand why we should remove formatted posts that are not visible in the widget.
obenland: I don't like it. They'd end up only be accessible through archive pages

Let's work with the .2 patch and keep testing.

#10 follow-up: @kraftbj
11 years ago

My last pitch for a possible change in thought, using myself as the test case.

On currently (at r25639 with .2 patch applied), I took a stream of image posts in one day. The latest one is in the widget, which happens to be at the bottom of the right sidebar.

The first two posts in the "main" area are the 2nd and 3rd most recent image format posts. It seems wonky to me that the most recent image would be in the sidebar, relatively buried by choice, while the older image formatted posts are in the main stream, more prominent in this case.

For my purposes, I want the main stream to be only the content formats that isn't relegated to the widgets. My longform posts are the highlight of the blog (as was before this patch, currently up at, while my photoblog, random asides, etc are at /type/images, /type/asides, etc.

If I wanted the format to be part of the main stream, I wouldn't have limited it to display only the most recent in the widget. Or, at least taking the original functionality more into account, the most recent image in the sidebar while older content of the same format is promoted in a higher place potentially.

My final pitch. :-)

#11 in reply to: ↑ 10 @obenland
11 years ago

Replying to kraftbj:

My last pitch for a possible change in thought, using myself as the test case.
My final pitch. :-)

Never stop fighting!

I think I was a bit too quick in my reaction. We narrow the results only down when we are on the front page, not on any subsequent page. I think does kind of make sense take all posts of that format out, to avoid showing older posts of the same format more prominently than newer posts.

Having said that, the purpose of the widget is to bring formatted posts to the reader's attention that would otherwise be hidden in subsequent pages. One could also argue to not remove the posts in the first place.

#12 @lancewillett
11 years ago

  • Keywords has-patch needs-testing removed
  • Milestone 3.8 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closed with the changes in r25762, see #25565.

#13 @lancewillett
11 years ago

In 25814:

Twenty Fourteen: cleanup, props iamtakashi. Fixes #25613.

  • With the ephemera widget in place, content-recent-formatted-post.php is unused, see #25028.
  • We're no longe filtering formatted posts from the main query, see #25330.
    • Fix a typo.
Note: See TracTickets for help on using tickets.