"Add new" not appearing for users

Support MB Custom Post Type "Add new" not appearing for users

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45838
    Jonathan GardnerJonathan Gardner
    Participant

    I have a site with a number of custom post types and custom fields. Some of those custom fields are of the "Post" type to make a selection of other custom posts. This works very well and was very easy to set up.
    In the "Post" type custom field, I selected the box "Add new" that allows users to add a new post of the selected post type while they are adding or editing a new instance of the custom post type. This works fine for Administrators and Editors, but the "Add new" link doesn't appear for any other roles, even though the roles have the custom capability mapped to publish, edit, and delete the custom post types.

    For example, to reproduce the problem:
    Create a Custom Post Type "Parent" with the custom capability enabled.
    Create a Custom Post Type "Child" with the custom capability enabled.
    Create a custom field of type "Post" that appears on the "Parent" called "Children". Enable the "Add new" checkbox.
    Create a custom role called "Family Manager" with Publish, Edit, and Delete permissions for both "Parent" and "Child" post types.
    Add a new user with the role "Family Manager".
    The user can now add both parents and children.
    Add a new "Parent". The "Add new" link does not appear on the custom field to add a new "Child" on that parent.

    I suspect this is hard coded to show the "Add new" link on a custom field for only Editor / Administrator roles. Could this be modified to show the link for all roles with the appropriately mapped capabilities?

    Is there some other workaround that I might be able to do besides telling my users to first create the "child" custom posts?

    #45844
    PeterPeter
    Moderator

    Hello Jonathan,

    If you are using a custom user role, please try to enable the capability edit_posts for the role and let me know if it helps.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.