WordPress.org

Ready to get started?Download WordPress

Forums

No permission for admin to manage add/edit custom posts (4 posts)

  1. hogo
    Member
    Posted 1 year ago #

    Hello,

    I am creating a plugin that requires a custom posts. Sadly when I am logged in as admin I cannot edit custom posts (Title is not a link). I cannot add custom post to (after clicking save I got a page with a message "You do not have permission to edit this post").

    What could be wrong?

    BH

  2. jrav001
    Member
    Posted 1 year ago #

    Could be a capabilities setting. Can you show us your register_post_type args?

  3. hogo
    Member
    Posted 1 year ago #

    Here it is:

    'capabilities' => array(
            'edit_post' => 'edit_swpd_record',
            'edit_others_posts' => 'edit_others_swpd_records',
            'publish_posts' => 'publish_swpd_records',
            'read_post' => 'read_swpd_record',
            'read_private_posts' => 'read_private_swpd_records',
            'delete_post' => 'delete_swpd_record'
        ),
  4. hogo
    Member
    Posted 1 year ago #

    OK, never mind I managed to solve it myself

Topic Closed

This topic has been closed to new replies.

About this Topic