Getting all ID’s matching a title in a custom post type
Just change the $args array to this: //Let’s say you’re searching the posts with the title ‘The searched post’: $pages = array(); $args1 = array( ‘s’ => ‘The searched post’, ‘post_type’ => ‘course-manager’, ‘posts_per_page’ => -1 ); query_posts( $args1 ); Your query_posts will return all the posts with the title alike ‘The searched post’.