We run a news site and it is very common practice on news sites to have a sidebar on articles pages with featured articles, etc. The problem is, I can’t filter those featured posts to exclude the current post being viewed. I would be surprised if a theme designed for news sites does not have an option available for this.
Is there no way to have the sidebar on a post page exclude the current post? It looks ridiculous displaying the same article being read in the sidebar.
Theme doesn’t support that apparently. Most don’t as the module cannot check to see which story the module is being loaded on — would be huge hit on the dbase to query that for every page load. Lots of news sites default to this behavior under “latest stories…”
Hi,
This will be implemented in the theme in a future update. I could give you a solution if this is required, in the meantime. Paste this code
– https://pastebin.com/bM8MaNXR
In this file here – https://www.screencast.com/t/2Js2sDc5P6cQ
Thanks
Hi,
The modification will have to be made in the mentioned file, in the theme folder. Usually this requires FTP access to the WordPress install on the server
– http://www.wpbeginner.com/beginners-guide/how-to-use-ftp-to-upload-files-to-wordpress-for-beginners/
The file has to be edited and the lines of code added as shown in order for this to work.
Thanks