Wordpress Get Post Id By Meta Value

WordPress: Get Post ID by Meta Value

If you are into developing custom themes for WordPress, you probably know how useful it can be to use custom meta fields in your posts. But only adding those fields is not enough. You need custom loops or functions to filter/get your posts using those meta values. In this post, we share with you a […]

Read more WordPress: Get Post ID by Meta Value

MySQL Query to List WordPress Posts Using Meta Query

To get a list of WordPress Posts using meta query in MySQL, you can use the following SQL query: SELECT p.ID, p.post_title, m.meta_id, m.meta_key, m.meta_value FROM `wp_posts` p LEFT JOIN `wp_postmeta` m ON p.ID = m.post_id WHERE m.meta_key = ‘wpcf-show-status’ AND m.meta_value ” ORDER BY p.post_title ASC This query will create a list with ID, […]

Read more MySQL Query to List WordPress Posts Using Meta Query