For my REST-API i need to get for every post the username, date ... and Avatar !
$query ="SELECT POST.ID, POST.post_title, POST.post_date,
USER.user_nicename FROM
wp0x_posts POST INNER JOIN wp0x_users USER
ON USER.ID=POST.post_author and POST.post_type='post' ";
The probleme that i have faced is that the avatars are stored in wp_posts , so i don't know how to call it for posts titles and call it again for users avatars
it would be much easier if the avatars were stored in wp_users :/
is there a way to get all these values in one query
POST ID
POST TITLE
POST DATE
AUTHOR
AVATAR
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745182361a4615476.html
评论列表(0条)