Site icon Hip-Hop Website Design and Development

How do I get a number of pages by title?

In my plugin, I would like to search out any posts of a customized publish kind which have a sure title. I used to be utilizing this:

$my_post = get_page_by_title( $title, OBJECT, 'my_custom_post_type' );

This works nice, but when there may be multiple publish with the identical title, get_page_by_title will solely return one end result. In keeping with the Codex article on get_page_by_title, that is the right conduct for the perform.

How do I retrieve all of the posts with a given title, somewhat than only one?