Get custom posts based on meta field content

To get posts on basis of their meta content, You can use get_posts function as given below:

 

Another equivalent query using meta_query instead of meta_key and meta_value:

 

Leave a Reply

Your email address will not be published. Required fields are marked *