Custom query for posts outside wp_posts table
-
Hey,
I am currently building a website which will display user submitted image posts. I have a voting system which stores likes and dislikes in a custom mysql table in the format:
ID
(Auto Incrementing)
PostID
(ID of the liked/disliked post)
Key
(like
ordislike
)
Value
(Number of Likes/Dislikes)This is working perfectly fine. However what I want to do now is display two different blog sections on the website. One in which all posts are initially shown and one where posts are moved to that reach for example 20 likes.
I have searched for a way to do this but haven’t found any query I could use to realize this. I know it would probably be better if the likes/dislikes would be saved aspost_meta
but the like system wasn’t implemented by me and I am not sophisticated enough to change this by myself. Unfortunately the support I’ve gotten from the guy who did it was very poor, still I kind of want to keep it and get this working somehow as the liking/disliking process itself is very good.
If anybody could help me out with how to query for the right posts to display in each section it would be awesome!
Thank you guys for reading!
Best Regards,
Jay
- The topic ‘Custom query for posts outside wp_posts table’ is closed to new replies.