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?
get_page_by_titleand is the custom post type hierarchal, i don't thinkget_page(called byget_page_by_title) will work for non-hierarchal types. – t31os Mar 6 '11 at 11:00get_page_by_title? – t31os Mar 6 '11 at 23:27