retrieve the oldest post id
سؤال
I'm trying to get the ID of the oldest post with the post_type = job_listing
and post_status = publish
. I'm using the code below but it does not work. Could anyone please help me
$oldestID = mysql_query("select id from wp_posts where post_type = 'job_listing' and post_status = 'publish' order by post_date ASC");
Thanks!
لا يوجد حل صحيح
لا تنتمي إلى wordpress.stackexchange