How to get custom post type post id from slug?

Posted by Prem Tiwari | Updated on

You can use get_page_by_path() – don’t let the name fool you, third argument is the post type:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers