Exclude current post
-
Hello,
I am looking for a way to exclude the current post from the query results.I know that, via the WP_Query, I must exclude the {{post:ID}}.
Here I found how to get values from the current post:
[query slug="my-query" args="p={{post:ID}}"]but the contrary doesn’t seem working. I tried for example this:
[query slug="my-query" args="p!={{post:ID}}"]
but without success.I try to achieve the following query:
[qw_query slug="my-query" args="p!={{post:ID}}&s=my-keyword&post-type=post"](= “show all posts containing the my-keyword excepted the current post”)Can you please help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Exclude current post’ is closed to new replies.