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.
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
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/
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
I just managed to catch this again.
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.
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
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/
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.