I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task.
I need to get the ID of any given post/ cpt or page using either the slug of the post/ page title. Ideally I'm looking for the following:
get_post_ID_by_title('My post title', 'customposttype');
What should I be doing?