Quantcast
Channel: Active questions tagged yoast - Stack Overflow
Viewing all articles
Browse latest Browse all 97

Wordpress 1 query to get post data [duplicate]

$
0
0

I need a single query to get id,title,content from post table and focus keyword from yoast seo table. I'm working on one project that can't run 2 queries and only can run one query and get only one array in return. any suggestion?

$query = 'SELECT `ID`,`post_title`,`post_name`,`post_content`,`post_status`,`post_date`,`post_modified` FROM `wp_posts` WHERE post_type="post" AND post_status="publish" ORDER BY post_date DESC LIMIT '.$limit;

This code returns post data but yoast data is in another table


Viewing all articles
Browse latest Browse all 97

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>