07-27-2023, 10:36 AM
<br />
I've added a **custom user type** in Wordpress, the **custom post type** supports Authors(See below). The custom user type has all the privileges of an author except for 'publish posts', but is **not** on the list of possible authors to assign to the post.
What am I doing wrong?
Code:
if (!get_role('member')) {
add_role('member', 'SFUK Member', array(
'delete_posts' => true,
'edit_posts' => true,
'read' => true,
'upload_files' => true,
'edit_published_posts' => true,
'delete_published_posts' => true
));
}
and here is the custom post type :
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => true,
'menu_position' => 0,
'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'author')
);
if (!post_type_exists('ent')) {
register_post_type('ent', $args);
remove_post_type_support('ent', 'editor');
}
Let me know if more information is needed.
I've added a **custom user type** in Wordpress, the **custom post type** supports Authors(See below). The custom user type has all the privileges of an author except for 'publish posts', but is **not** on the list of possible authors to assign to the post.
What am I doing wrong?
Code:
if (!get_role('member')) {
add_role('member', 'SFUK Member', array(
'delete_posts' => true,
'edit_posts' => true,
'read' => true,
'upload_files' => true,
'edit_published_posts' => true,
'delete_published_posts' => true
));
}
and here is the custom post type :
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => true,
'menu_position' => 0,
'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'author')
);
if (!post_type_exists('ent')) {
register_post_type('ent', $args);
remove_post_type_support('ent', 'editor');
}
Let me know if more information is needed.