Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #514084

    Hello support team,

    I was wondering if there is a way to hide the Avia Layout Builder for all users except admins? And by hiding I mean only the 3 tabs with “Layout Elements”, “Content Elements” and “Media Elements”
    The existing elements that are used to create the pages can stay, but I want to prevent that a user can add new elements to these pages. I only want to allow him to make changes within the existing page items.
    Maybe these tabs must stay but there is a way to hide some of the items? So when he clicks on the Content Elements” tab, the only buttons/icons he can see are the ones I gave him rights to. As an example, Text block, icon, button.

    I hope I explained it well ?

    Thanks in advance!
    Best regards,
    Nin0

    #514493

    Hey Nin0!

    You can do this, https://kriesi.at/support/topic/hide-button-in-the-backend-disturd-image-upload/#post-497177, to hide certain elements in the layout builder via CSS.

    See here for checking if the user has certain privileges, https://wordpress.org/support/topic/checking-if-the-user-is-admin.

    Cheers!
    Elliott

    #514735

    Hello Elliott,

    Thanks for the quick reply. I’ve tried it with the code you gave me, but it did not work. (or I did something wrong?) I saw that you have to write it in the functions.php. I did it true a plugin called my custom functions. Normally this should work to.
    I can still see all of the icons/tabs from the builder. I will send you an image to let you see what I want to hide. The row marked in color is the row I wanted to hide. The complete row or (if it’s not possible) some of the individual items as a mentioned in my previous mail. Can you please take a look at this?

    Thank you
    Best regards,
    Nin0

    #514775

    Hey!

    Can you please provide us with access, so we can also test that code?

    Cheers!
    Basilis

    #514828

    Yes, no problem.
    I’ve created an admin account
    You can see the code I’ve entered In “Appearance/Custom Functions”

    Thank you for taking a look at it.
    Best regards,
    Nin0

    #515181

    Hey!

    try to put the code inside of your actual functions.php (or even better inside your child theme), instead of using an external plugin for it. Let us know about your results with it.

    Cheers!
    Andy

    #515209

    Hello Andy,

    I’ve tried this, but without any results. In fact, when I put the code, I get a white screen !
    I used this script:

    add_action( ‘admin_print_styles’, ‘enfold_customization_admin’, 10 );
    function enfold_customization_admin() {
    echo ‘<style type = “text/css”>’;
    echo ‘a[href=”#avia_sc_button_full”] { display: none; }’;
    echo ‘</style>’;
    }

    It doesn’t matter if I put it on top or on the bottom of the file, it still gave me a white screen.

    Is it possible to you take a look at it? I’ve already created a login for you (requested by your colleague Basilis)

    Tnx,
    Best Regards,
    Nin0

    #515992

    Hey!

    The CSS for the whole builder would look like this.

    add_action( 'admin_print_styles', 'enfold_customization_admin', 10 );
    function enfold_customization_admin() {
    	echo '<style type = "text/css">';
    	echo '#avia_builder { display: none; }';
    	echo '</style>';	
    }

    You can also hide it by clicking on “Screen Options” in the top right hand corner of your screen and unchecking the layout builder option.

    Cheers!
    Elliott

    #516300

    Hey Elliot,

    Unfortunately that doesn’t work. I tried it writing it in my custom function page and also in my “functions.php” page.
    Both gave me a white screen.
    I could be wrong, but didn’t you’re colleague asked for credentials to log in my site so you could test it yourself? The user is still active, so if possible you can take a look at it.
    Probably I’m doing something not the correct way?

    Tnx,
    Nin0

    #517097

    Hi,

    I tried logging in at the domain of your screenshot but it seems to not be correct, could you link directly to the login page please?

    Regards,
    Rikard

    #521078

    Hello Rikard,

    I’m sorry for the late reaction. I thought that I’ve already posted a reply.
    Thanks for taking a look at it.

    Best regards,
    Nin0

    #522005

    Hi!

    How come your missing the “Editor” link in Dashboard > Appearance > Editor? I deactivated all of your plugins but it’s still missing.

    Regards,
    Elliott

    #540185

    Hello Elliott

    Sorry again for my very late reaction. There were some unforeseen issues that I’ve had to handle first.
    I disabled the editor in my wp-config file for extra security reason. If you want to take a look now, I have enabled it again for you.

    Thanks and best regards,
    Nin0

    #542102

    Hey!

    I tried to login to the site but the login credentials above is not working. Please check. I tried it the third time and I got this error:

    You are temporarily locked out

    You have been temporarily locked out of this system. This means that you will not be able to sign-in or use several other features that may compromise security. Please try back in a short while.

    Return to the site home page
    Attempt to return to the admin login page (you may still be locked out)

    The code provided above should work but if you need another method, try this: https://kriesi.at/support/topic/hightlighted-javascript-code-into-posts/#post-452968

    Regards,
    Ismael

    #542227

    Hi Ismael,

    It seems that I’ve send the credentials (for another question) to a colleague of you and probably I’ve changed the password.
    I’m sorry for the mistake. Here is the correct one in a PM (I’ve tested it first)

    I’ve tested the other link but I can’t get it to work. I’ve did it also in my function.php, but that broke my site.
    May I ask you to take a look at it please?

    Tnx,
    Best regards,
    Nin0

    #542304

    Hi!

    I think in the new Enfold version (v3.4.4) there is a new option for what you want to achieve. Please upgrade and then go to Enfold->Theme Options and look for “Lock advanced layout builder”.

    Cheers!
    Andy

    #542986

    Hi Andy,

    That seems to be the solution. This does exactly what I want!
    Tnx for the tip

    Best regards,
    Nin0

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Hiding the Avia Layout Builder for regular site users’ is closed to new replies.