When user open any post, then on the right side they can see related posts to that post. But currently in related posts my current open post also showing, how i can exclude that post which is currently open.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
Use the parameter
|
|||||
|
|
If you could give us some code snippets of what you are currently using, it would help us formulate an answer. Unfortunately I don't have enough reputation to say this as a comment on the OP, so I will provide my answer based on the knowledge provided in the OP. When loading the current post (presumably by using
Later, in your loop to display related posts, you need an if-statement to skip the loop if the ID's match. Like so:
|
|||||||||||
|
