Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #493968

    Hi,

    What code can I add to my functions.php file to hide the Templates button from non-admins in the Avia Layout Builder?

    Thank you!

    #494083

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_action('admin_head', function() {
    	if( !current_user_can('activate_plugins') ){
                ?>
                 <style>.avia-template-save-button-container{ display: none; } </style>
                <?php
            }
    });

    Cheers!
    Josue

    #494592

    Thank You!!
    I have one other question. The pages I am hiding the buttons on are Portfolio pages that we have already set up for each user. We only want the user to make changes, not add a bunch of stuff, so I have hid nearly all of the elements to restrict what can be done ( I found that solution on another post). So, the only thing left to hide is the “Default Editor” button. I don’t want anyone to get confused if they click that and see a blank page. My only concern was that, for some reason, the page might open up in Default Editor mode and they might need to click on the button to get back to the Avia Layout Builder. Is this a concern? If not, how would I hide that button?
    Thanks again!

    #494682

    Hey!

    Try with the following CSS code:

    a#avia-builder-button {
        display: none;
    }

    Best regards,
    Josue

    #495155

    Thank You!

    #495293

    You are welcome, glad to help :)

    Regards,
    Josue

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