Get The Post Type of the Current Post with JavaScript

Whenever you need to get the post type for a given post, there are a couple of ways to do this: If you’re in the dashboard, then you can use get_current_screen() and then access the id property of the object...

We do not write or claim ownership of any of the articles featured on this website. Instead we aim to highlight them so you can read the full article at the original source. To finish reading this article, follow the continue reading link below. CONTINUE READING
Author: Tom McFarlin

Tom McFarlin is a a self-employed developer who works with WordPress and JavaScript to build software for others.

Sign up to our newsletter

Don't worry, we won't give your email to any third parties
and you can unsubscribe at any time.