• Resolved vhegde

    (@vhegde)


    Hello There!

    I have utilized the 「Code Block Pro」Plugin and have been editing my site using my Admin role.

    However, currently we have added team members with the role: Author to the site and are facing a problem where the authors are shown the below message on the code pro blocks and are unable to edit them. (Admin can still edit them)

    Shown when User Role: Author

    Read-only mode: The?unfiltered_html?capability is required.

    I understand that this is a safety feature but how do i resolve this so that the Authors can edit the code block by themselves?

    is there any additional installation or settings that need to be changed.

    would really appreciate any suggestions.

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kevin Batdorf

    (@kbat82)

    Hey, so to allow authors and others to add html to a page, right now you need to give them the unfiltered_html capability. The reasoning is that wordpress will strip out any html otherwise, so you’d end up with broken code blocks. I built the plugin to persist the entire html markup so that it works in a completely static way so that it requires no serverside processing.

    Are you okay giving them that permission? If so, then you can just add this code snippet to give them access: https://neilsonwebdesign.com/filtering-user-capabilities-in-wordpress/

    Thread Starter vhegde

    (@vhegde)

    Hello Kevin!

    Thank you for your quick response.

    I understand that granting the “unfiltered_html” permission is my only option for resolving this issue for my authors. I also realize that I need to add a code snippet to enable this permission. Sorry for asking this question as I am new to using WordPress but, could you please guide me on where exactly to insert this code snippet to resolve the issue?

    Thank you in advance for your assistance.

    Plugin Author Kevin Batdorf

    (@kbat82)

    So you have two options I think.

    1. Advanced but effecient: Go to the link I shared above, copy the code, and add it to your theme. However, if you have a non-custom theme that could get an update (for example if you downloaded the theme somewhere instead of custom made), it would override this change. In that case you have the option of using a “child theme” or adding a “must use plugin” but just let me know if you want me to explain those.
    2. Use a plugin to adjust user capabilities. This one from PublishPress looks perfectly fine and has high usage. The team there looks active in maintaining the plugin and supporting users, so I’d argue it’s trustworthy to install (should always evaluate everything you add though). They should provide an admin interface for adding it.

    Let me know if still stuck though and I’ll help debug any issues.

    Steve Burge

    (@stevejburge)

    Hi @vhegde @kbat82 Please tell me go away if this isn’t helpful, but we have an alert set up for “PublishPress” and I got pinged about this. Here’s a quick guide to the unfiltered_html?capability and how to give it to users: https://publishpress.com/blog/unfiltered-html-permission-wordpress/

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