Meta query on post_title not working

I’m query looping through the posts post type to return results where the category = news. This works fine.

However, the moment I try and add a meta query like the simple one below then I get no results:

meta key: post_title

meta value: Test news 5

compare: equals

type: char

I’ve done meta queries before using metabox fields and not had an issue so I’m confused as to why matching a single post title is not working? The title of the news post I have entered for the meta value is correct in spelling and case sensitivity.

Any one have an idea?

Thanks.

Hi @simon ,

post_title is not a meta key, that’s why you can’t get any result.

If you want to include a specific post, just choose from the Include dropdown.

Hi @itchycode,

Thanks. I was trying post_title as I couldn’t get post_date to work initially. What’s the best way to find out what meta keys there are for a post type?

Simon