Home Forums WoodMart support forum Users with role “Editor” cannot edit HTML Blocks

Users with role “Editor” cannot edit HTML Blocks

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #494344

    wkmaster1985
    Participant

    On a website I created a user with the role “Editor”.
    When the user wants to edit an HTML Block item via “Edit with Elementor”, the Elementor page loads and shows an error message. Please see screenshot and credentials attached.
    How can I solve this problem?

    #494397

    Luke Nielsen
    Keymaster

    Hello,

    Could you please check how it works with the pages?

    Thank you in advance.

    Kind Regards

    #494408

    wkmaster1985
    Participant

    It works with pages, but not with the HTML Blocks provided by your theme.

    #494447

    Luke Nielsen
    Keymaster

    Hello,

    Please add the below code to the functions.php file in your child theme.

    add_filter(
    	'woodmart_html_block_access',
    	function() {
    		return 'editor';
    	}
    );

    Then recheck the issue and let me know.

    Kind Regards

    #494880

    wkmaster1985
    Participant

    Thank you for your code snippet. The problem now is that when I am logged in as an administrator, I cannot access the HTML Blocks anymore. How can I adapt the code so that BOTH editors and administrators can edit HTML blocks? Returning an array ([‘editor’, administrator’]) doesn’t work.

    #494883

    Luke Nielsen
    Keymaster

    Hello,

    Please replace the old code with this one:

    add_filter(
    	'woodmart_html_block_access',
    	function() {
    		return 'edit_pages';
    	}
    );

    If it doesn’t help you, please send access to the admin dashboard so we will check it on your side.

    Kind Regards

    #494886

    wkmaster1985
    Participant

    Thank you for the quick response, Luke, this helps.

    #494889

    Luke Nielsen
    Keymaster

    Hello,

    Glad that it helped you!

    Always remember that you can reach out to us with any questions you may have.

    We wish you a splendid day!

    Kind Regards

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Users with role “Editor” cannot edit HTML Blocks’ is closed to new replies.