When I call get_post_types() in a plugin the output is registering only the basic set of post types. Here is the output:
array(5) { ["post"]=> string(4) "post" ["page"]=> string(4) "page" ["attachment"]=> string(10) "attachment" ["revision"]=> string(8) "revision" ["nav_menu_item"]=> string(13) "nav_menu_item" }
In this wordpress theme, however, I have registered a custom post type called 'artist', but it is not showing up. If, however, I call get_post_types() in the index.php file it does how the registered posts:
array(8) { ["post"]=> string(4) "post" ["page"]=> string(4) "page" ["attachment"]=> string(10) "attachment" ["revision"]=> string(8) "revision" ["nav_menu_item"]=> string(13) "nav_menu_item" ["acf"]=> string(3) "acf" ["artist"]=> string(6) "artist" ["release"]=> string(7) "release" }
Does anyone know why this is happening and how to get around the problem?
get_post_types()
?