Get ID Custom post WP
-
Hi. I need to output the code depending on the id of the post. The fact is that a custom post type “reviews” was created and I need to output the code depending on what ID the custom post has. Code like this, doesn’t work
if (get_post_type($post_id) === 'reviews' && get_post_type(3700)) { ... }
I need this to work outside of the loop WP
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get ID Custom post WP’ is closed to new replies.