Get Post Types in admin

I have this code in a page of my custom theme:

$args = array(
‘public’ => true,
‘_builtin’ => false

$output = ‘names’; // names or objects, note names is the default
$operator = ‘and’; // ‘and’ or ‘or’

$post_types = get_post_types( $args, $output, $operator );

This code if loaded in a wp-admin page.

The problem is that I want to load all types of post, I tried changing the built in but it does not work. I want to get the default post of wordpress and the custom post type as woocomerce products. Does someone help me? Thank you!

Read more here:: Get Post Types in admin

Leave a Reply

Your email address will not be published. Required fields are marked *