Home Forums ACF PRO get_post_types( array( '_builtin' => false ) )


get_post_types( array( '_builtin' => false ) )

  • hello
    get_post_types( array( '_builtin' => false ) ) also returns some ACF created custom post types – is there a way to avoid this or remove ACF custom post types from the array?

    any help is very much appreciated.

  • Hi @mmjaeger

    If you want to show your custom post type only, you can use this code:

    get_post_types( array( 'public' => true, '_builtin' => false ) )

    If not, you can always use unset() to remove ACF’s custom post types.

    I hope this helps.

  • That did the trick – thank you James!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘get_post_types( array( '_builtin' => false ) )’ is closed to new replies.