-
AuthorPosts
-
October 5, 2015 at 11:31 pm #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,
Nin0October 6, 2015 at 4:06 pm #514493Hey 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!
ElliottOctober 6, 2015 at 8:58 pm #514735Hello 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,
Nin0October 6, 2015 at 9:34 pm #514775Hey!
Can you please provide us with access, so we can also test that code?
Cheers!
BasilisOctober 6, 2015 at 10:42 pm #514828Yes, 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,
Nin0October 7, 2015 at 1:25 pm #515181Hey!
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!
AndyOctober 7, 2015 at 1:52 pm #515209Hello 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,
Nin0October 8, 2015 at 5:09 pm #515992Hey!
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!
ElliottOctober 9, 2015 at 10:58 am #516300Hey 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,
Nin0October 12, 2015 at 5:13 am #517097Hi,
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,
RikardOctober 19, 2015 at 5:32 pm #521078Hello 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,
Nin0October 20, 2015 at 9:09 pm #522005Hi!
How come your missing the “Editor” link in Dashboard > Appearance > Editor? I deactivated all of your plugins but it’s still missing.
Regards,
ElliottNovember 21, 2015 at 5:51 pm #540185Hello 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,
Nin0November 25, 2015 at 4:53 am #542102Hey!
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,
IsmaelNovember 25, 2015 at 9:59 am #542227Hi 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,
Nin0November 25, 2015 at 12:07 pm #542304Hi!
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!
AndyNovember 26, 2015 at 11:10 am #542986Hi Andy,
That seems to be the solution. This does exactly what I want!
Tnx for the tipBest regards,
Nin0 -
AuthorPosts
- The topic ‘Hiding the Avia Layout Builder for regular site users’ is closed to new replies.