## How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?

Question
I answered a question about capabilities, but now I'm in need of help on the subject. And after reviewing the manual, I'm even more confused. I have two custom post types both fully accessible to Administrators. ...
0
5 days 0 Answers 10 views

Question
I write a custom plugin, with one link for administration purpose. This is my code: add_action('admin_menu', 'tb_instructor_menu'); add_action( 'init', 'aggiungi_ruolo', 11 ); function aggiungi_ruolo() { $role = get_role( 'wdm_instructor' );$role->add_cap( 'view_webinar', true ); } function tb_instructor_menu() { add_menu_page('My code', 'My code', 'view_webinar', 'my-code', null, 'dashicons-businessman' , 61); } If I am ...
0
6 days 0 Answers 12 views

## How to allow only the editing/creation of specific CPT?

Question
I answered a question about capabilities, but now I'm in need of help on the subject. And after reviewing the manual, I'm even more confused. I have two custom post types both fully accessible to Administrators. ...
0
6 days 0 Answers 15 views

Question
I am creating a plugin for add menu option to WordPress admin and using below function for that: <?php add_menu_page( $page_title,$menu_title, $capability,$menu_slug, $function,$icon_url, \$position ); ?> But I would like to add absolute path for menu option in the ...
0
7 days 0 Answers 18 views

## Remove a menu item created by a plugin

Question
I'm trying to remove a menu item and tried several approaches, but have not had any luck. It was created from a FAQ plugin. If I use this line: remove_menu_page( 'edit.php?post_type=question' ); It will remove the main menu, however I only want ...
0
1 week 0 Answers 23 views

## How do I code access to the built-in UI of a CPT when it’s placed as submenu of another CPT that is protected by role?

Question
I am toying around with WordPress capabilities, and having some difficulty understanding where I am going wrong. Right now, I have an admin menu that appears for all administrators with STUDENTS as a submenu of SCHOOL: each of ...
0
1 week 0 Answers 14 views

## show badge with count for pending items in custom post type

Question
This code I have is working but I am not sure if it is the right way to do this. Basically when a user adds a record to a custom post type it goes straight to pending and needs an ...
0
2 weeks 0 Answers 19 views

## Getting post attchment URL to populate a CPT Admin Page Column

Question
Just trying to work out how to get the url of a file attached to a Post and displaying that in the admin page for that CPT. The file is attached to the post via an ACF file upload field ...
0
2 weeks 0 Answers 21 views