Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

get_post_types()

3 tags 1 category

get_post_types() — Gets a list of all registered post type objects.

Inputs: $args (array|string): Optional. An array of key => value arguments to match against the post type objects. Default empty array. $output (string): Optional. The type of output to return. Either ‘names’ or ‘objects’. Default ‘names’. $operator (string): Optional. The logical operation to perform. ‘or’ means only one element from the array needs to match; ‘and’ means all elements must match; ‘not’ means no elements may match. Default ‘and’.

Returns string[]|WP_Post_Type[]: An array of post type names or objects.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…