How do test if a post is a custom post type?

Posted by Prem Tiwari | Updated on

Add this to your functions.php, and you can have the functionality, inside or outside of the loop:

So you can now use the following:

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

Related Questions & Answers