Action 'Register Post Type': Non-public CPT can not be seen in Admin-Menu

Hi there,

wanted to create an CPT for testimonials. There is no single page for each testimonial needed so i need to not make it public, but queryable and visible in dashboard.

Problem: As soon as i remove the ‘Public’ option at the panel and export the theme, then the CPT is removed from the admin menu.

Maybe that’s because it’s impossible to force ‘Show UI’:
CleanShot 2023-08-10 at 13.50.37@2x

CleanShot 2023-08-10 at 13.50.42@2x

I need to move the code from function.php to custom.php and add the ‘show_ui’ => true value by hand to get it to work.

What am I doing wrong here?


See this example:

In Code there is no “‘show_ui’ => true” value generated:

I’ve found that the Register Post Type action in Pinegrow is missing a lot of important parameters (such as being able to rewrite the slug — feature request submitted already). I find myself writing it manually (or using an online generator) and including it in the custom.php.

I don’t like half-baked solutions. So if PG has this function it should be complete. Not a big deal to get it done, I’ll hope. @matjaz ?

1 Like