Change WordPress user roles and capabilities Forums How to or FAQ How to hide Yoast SEO block in custom post type editor for a specific role ?

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7022
    loicdelahais
    Participant

    Hello,

    I created a role “Artisan” and a custom post type “Annuaire”. The role can edit the custom post type but I don’t want him to be able to edit the Yoast SEO block. I know I can hide this block for a custom post type but I want to be able to edit it as an admin.
    Checkboxes are all unchecked for SEO for the role “Artisan” and only have custom capabilities like “edit-annuaire” etc but the role still have access to the Yoast box (not the admin link).

    How can I do ?

    Thanks !

    #7023
    Vladimir
    Keymaster

    Hi,

    You can use “Meta boxes access” add-on. Block “Yoast SEO” meta box for role “Artisan” using it.

    #7024
    loicdelahais
    Participant

    Thanks for the fast anwser! I tried Meta boxes but the role can only edit the title, even if i check all checkboxes for “Annuaire”. Moreover users with the role “Artisan” no longer arrive on the back office when they connect, instead they arrive on the front-end and need click on + Create > Annuaire to have access to the back office. They no longer have access to their profile either.
    Maybe i missed something ?

    #7025
    loicdelahais
    Participant

    Ok, I thought you had to check to give access, it was the other way around… It works but still have the issue that i want the role “Artisan” arrive on the dashboard, not the front-end. Is-it possible ?

    #7026
    loicdelahais
    Participant

    I unchecked the “Read” capabilities unintentionally… It works, thanks you very much!

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