Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display posts hidden in Recent Stories list when "Avoid Duplicate Posts" is checked #1287

Merged

Conversation

rclations
Copy link

solves #1219

The Problem

If a post is displayed in the Recent Stories / River View, then it will not display on the Regular / Top Stories view in Related Posts Widgets if "Avoid Duplicate Posts" is checked.

Posts in the Recent Stories / River View should not affect the display of stories in the widget areas of the Regular / Top Stories view.

The Solution

The $shown_ids variable is already being passed to widget(), containing the post IDs that have been displayed thus far on the page.

This PR removes the additional check against $wp_query->posts which is adding posts from the river view into the list of excluded ids.

@benlk
Copy link
Collaborator

benlk commented Sep 7, 2016

LGTM.

@rclations rclations merged commit 1f98ac9 into WPBuddy:develop Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants