admin管理员组

文章数量:1388919

Question: I have many custom post types and i want to return all the posts by just a few of the post types:

For example i have an array and was wondering if there was a way of passing this array to something like the get_posts function and it returning all the post types specified in the array.

Example array:

post_types = [ 
event,
award,
upcoming 
]

The above array would be passed to said function and i would be returned all posts matching only those in the array,

本文标签: plugin developmentGet all posts by many custom post types