Similar articles show current article

Posted in: Newspaper
Post count: 24

It seems that there is no filter to stop the current article from showing up in similar articles.

Is there a way to stop this from happening with a custom function or could this (has it) be added?

I have similar articles set to categories and there are a large number of articles in each category but we regually see the current article show up in the similar articles area.

Post count: 6600

Hi,

As you can see here there is an filter that should prevent the current post to be included to the similar articles section: http://screencast.com/t/dYHL7FjtnuFq so this should not happen.
I have also checked for this and found no issue with this. Could you please send a link of your site which has this issue so we can check this.

Thanks

Post count: 24

Interesting. Was that always there or added recently?

We recently updated and I can see that code in the template.

This is one page where it was happening but I have caching enabled at the moment so it’s not going to be easy to see: http://www.goodnewsnetwork.org/one-good-deed-spread-40-tables-vermont-diner/

Post count: 6600

Hi,

From what I know that filter always was there and should prevent this from happening. I have also tested your site and haven’t found this issue: http://screencast.com/t/tKzvD93yiC
Please make sure that this still happens and let me know when if it still dose.

Thanks

Post count: 24

I just managed to catch this again.

similar article showing current page

I opened the similar article in a new tab and checked the edit links in the admin bar and the post id’s were identical: 35924

It’s not easy to catch all the time as the site has thousands of articles but it is definitely happening.

Post count: 24
Post count: 6600

Hi,

I have noticed this now, thanks! Although I can’t explain how this happens as it should not. I suggest you also test this without any plugins active and also make sure that you empty cache and purge files if you use CDN, then check again.
You could also try to add this: http://screencast.com/t/36Xrdp0Up
This is the line of code: $args['post__not_in'] = array( $this->$post->ID );
Let me know how it goes!

Thanks

Post count: 24

Hi,

I’ve tried the code but it seemed to break the page.
I also tried wp_reset_query(); but that didn’t work either.

I’ll need to set up a copy of the site to test then plugins.

I’ll let you know how it turns out.

Post count: 6600

Hi,

Please let me know when you do and if you still have this issue please provide the link to the post on which this happens and let me know as I haven’t managed to recreate this.

Thanks

Post count: 24

Not having much joy with this.

I’ve set up a dev site and disabled all plugin except one, paid memberships pro (disabling it breaks the site).

Still seeing the same posts in the similar articles boxes http://dev.goodnewsnetwork.org/south-carolina-teens-fight-racist-vandalism-positive-message/

Post count: 1291

Hi,

I suspect it comes from the database, try to delete and recreate this post, see if this issue is still there after this. That section works fine under normal conditions, it must be something on your database or your server that’s causing this issue.

Thank you, Emil G.

Post count: 24

I’ve narrowed it down to paid memberships pro.

It’s replacing the post__not_in values to remove pages the current user doesn’t have access to.

I’ve added an issue on github to see if they have a workaround.

I guess this can be closed. Thanks for your help!

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.