Latest posts: how to exclude the post you are reading?
-
Hi,
I’m using the “Latest posts widget” on the Valenti theme (Themeforest). So, my sidebar is showing not only all the latest posts on my site, but it’s including the post from the post page itself, actually, any page where you go! I think it’s not a best practice: the page where someone click should be outside of the loop on php for the page, in order to not be shown on the sidebar (latest posts). It doesn’t make sense…
As an example, if I go the this page: https://www.okpeople.com.br/wearables/ralph-lauren-polo-tech/, then in the latest posts widget on the right, in the sidebar, there is a block showing this same post info. I’d like to exclude from this widget the post you are reading!
How can I achieve that, please? Is there a way in the WP, with a snippet of code or any option on theme admin?
Thanks.
- The topic ‘Latest posts: how to exclude the post you are reading?’ is closed to new replies.