How do I exclude current post
-
Hi !
I’m trying to create some queries to display the last posts except the one currently read.
If I wrote the query, I use the post__not_in filter and pass the parameter to $post->ID
I tried this but it doesn’t work. And I want to display this query in a widget, not a shortcode (so I can’t use a token I guess).So, is there a way to achieve that ?
Thanks a lot for your help !
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How do I exclude current post’ is closed to new replies.