I'm using this on my single.php to retrieve both the similar posts (using the same tags) and the popular posts (using comment count) as well. There is a problem, though. How to prevent similar posts to show up as popular posts too?
I'm using this on my single.php to retrieve both the similar posts (using the same tags) and the popular posts (using comment count) as well. There is a problem, though. How to prevent similar posts to show up as popular posts too?
possibly:
http://pastebin.com/HTRhygAG
re 1.
turn all tag ids into one array;
re 2.
use the 'post__not_in' in the second loop, with an array of collected post ids.
Ah, dumb me — I completely forgot I could do that using 'post__not_in'. Thank you!
You must log in to post.