Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1275355

    Hello,
    Wonder if it is possible to remove Portfolio Item Edit/Delete capabilities from the Author Role?
    I’ve tried using a plugin that will configure role capabilities (Members), however its looks like Porftolio Items are not listed.

    Also Tried to add to function file using… but No luck

                    'read_portfolios'
                    'edit_portfolios'
                    'delete_portfolios'
                    'publish_portfolios'
    

    Any options on a function for this or other possibilities.
    Thanks for your help

    #1275765

    Hey jberg1,

    Thank you for the inquiry.

    You may be able to use the get_role function to edit the capability of a certain user role.

    // https://codex.wordpress.org/Function_Reference/get_role

    You could also create a custom user role using the add_role function.

    // https://developer.wordpress.org/reference/functions/add_role/

    For a more detailed instruction on how to alter the capabilities of certain user roles, please check the following article.

    // https://3.7designs.co/blog/2014/08/restricting-access-to-custom-post-types-using-roles-in-wordpress/

    Best regards,
    Ismael

    #1275838

    Thanks Ismael,
    Yea, I’ve tried these however, I’m trying to set it for existing role of Author (actually disable for Author role). It doesn’t seem remove those capabilities at all. My main issue is when I use “portfolio” or “portfolio_item” it doesn’t work. And that plugin doesn’t even see the Portfolio as a post type to control capabilities for.

    I wonder if it could be that capabilities are not set on the post type when registered. There for I can’t set them per user.
    Capabilities Mapping, As explainer here.
    http://justintadlock.com/archives/2010/07/10/meta-capabilities-for-custom-post-types

    Wonder if it is possible to map those capabilities for the portfolio content type in a function in the child theme, without hacking the parent theme?
    Thanks for your help.

    #1275967

    Hi,

    Thank you for the info.

    You should be able to use the avf_portfolio_cpt_args filter to adjust the existing parameters of the portfolio post type and define the capabilities. And as recommended in the article, you have to use a membership plugin such as the wordpress.org/extend/plugins/members to be able to assign custom capabilities to user roles.

    // https://memberpress.com/plugins/members/docs/

    Please be very careful when assigning capabilities to user roles.

    Best regards,
    Ismael

    #1403359

    Hi!
    For a new restaurant and worker finder website we use portfolio items to present restaurants and other companies. For certain customers we want to give them the possibility to change and delete the own portfolio items. Is it possible to do it with the enfold theme?
    Many thank for your answer.
    Chris

    #1403831

    Hi,
    Thank you for your patience, as Ismael advised above you will need to use a membership plugin to be able to assign custom capabilities to user roles to achieve this. I have not tested which membership plugins work well with Enfold, but Ismael recommends the Members plugin.

    Best regards,
    Mike

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