|
Your query isn giving you a post ID, it's giving you an entire post. The
Try using: Aside from that, I see problems with what you're doing ... except that querying the database every time the site is loaded might eventually create performance issues. I'd set up an hourly chron job instead to automate the process ... then it doesn depend on or slow down user traffic. |
| More Solution |
|---|
Reffered: https://wordpress.org/