hello
I want to display post based on his ID. This post could be a default 'post', 'page' or other registered custom post type. In query I sould specify all CPT names which I want to use, for eg.
'post_type' => array('post', 'page', 'my_cpt')
My question is how can I set 'post_types' automatically for all registered post types, without manually specify them?
I'm striving for something like that:
$post_types = ALL-POST-TYPES-NAMES;
$the_query = new WP_Query(
array(
'post_type' => $post_types,
'p' => ID,
)
);
Thanks!