Open sunsgs opened 6 years ago
Hi @sunsgs
Yes, you can pass options for a post type when creating it like so...
$books = new CPT('book', [
'show_in_nav_menus' => true,
]);
The second argument is the options for the CPT that matches the WordPress arguments for register_post_type
thanks. In this way i can select add all my custom post type automatically without to select on by one in menu section?
@sunsgs yes, I believe so.
I need to add automatically to primary_menu (in the front end) all CPTs. Is it possible to pass show_in_nav_menus attribute?