querying a custom post type by the title
-
Hi there
Im trying to query a custom post type ( headers ) by the post_title
I have the below code but it doesnt seem to work and always returns the first post in the list
$args = array( ‘post_type’ => ‘headers’, ‘post_title’ => ‘home’, ‘showposts’ => 1 );
$loop = new WP_Query( $args );Any ideas What i am doing wrong?
Thanks in Advance.
Steve
- The topic ‘querying a custom post type by the title’ is closed to new replies.