How to exclude current post when listing random posts in single.php
-
I have a piece of code that lists 3 posts from the same category but in RANDOM form in single.php.
So it basically display 3 random posts from the same category.
I’m facing a problem where there is a possibility that the current will appear in this post since it belong to the category too.
Are there any ways that can exlude this current post to be listed in the random listing?
This sounds like something fairly easy to achieve but yet my php skill is private limited so hope some kind soul can give some pointers.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘How to exclude current post when listing random posts in single.php’ is closed to new replies.