I have some post ids in an ID array, like:
$ids = array(20,34,65,126) ;
There is many custom post types in my project, these ids are related to different post types, but I dont know which id is related to which post type in that condition. In another word, I need to do something like this:
$posts = my_get_posts( 'ids' => array(20,34,65,126), 'post_type' => 'product', ) ;
That function has to be eliminate ids which is not a producy.
How to do this?