Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #486021

    The inverse of this two year-old thread!

    At some point, it seems Enfold has gained support for the Avia Advanced Layout editor in standard Posts, which appears to be defined (as previously), in wp-content/themes/enfold/config-templatebuilder/avia-template-builder/config/meta.php:

    array( 'title' =>__('Avia Layout Builder','avia_framework' ), 'id'=>'avia_builder', 'page'=>array('post','portfolio','page','product'), 'context'=>'normal', 'priority'=>'high', 'expandable'=>true ),

    I can happily remove the post from that list and go back to how things were, but is there a way of doing this without altering core files? I’m happily adding custom post types to the Avia Builder list using add_builder_to_posttype: is there a corresponding ‘remove_builder_from_posttype’?

    Update:
    I’m an idiot. add_builder_to_posttype is my function, declared more-or-less as here. However, I’m still not clear how I’d remove the builder from Posts.

    • This topic was modified 8 years, 8 months ago by jjsanderson.
    #486075

    Hi jjsanderson!

    Try adding this to the bottom of your functions.php file.

    add_action( 'admin_print_scripts', 'enfold_customization_admin_styles' );
    function enfold_customization_admin_styles() {
        echo "<style type='text/css'>";
        echo ".post-type-post #avia-builder-button { display: none; }";
        echo "</style>";
    }

    Cheers!
    Elliott

    #486087

    Ah, cunning – just hide it in the admin. I should have thought of that. With a little fiddling around of post type capabilities and which types have Avia added explicitly, I think that’s got it. I’ll test and deploy.

    Many thanks for the speedy response!

    #486172

    Hi!

    Alrighty, let us know if you have any other questions.

    Best regards,
    Elliott

    #1118328

    Hi,

    I have the same problem as jjsanderson.
    I want to remove the Avia-Builder-Button only for posts (for all users).
    If it’s possible I want to do that in the child-theme-files.

    Unfortunately the code provided by Elliott doesn’t work anymore.

    #1118336

    Hi,

    If you want to hide the button then you can add this in the /enfold/config-templatebuilder/avia-template-builder/assets/css/avia-builder.css.

    #avia-builder-button { display: none !important; }

    Best regards,
    Jordan Shannon

    #1118342

    Hi,

    thanks for your help.
    Is there even a way to do that in the style.css or functions.php of the child-theme?

    #1118343

    Hi,

    You can add it to the page I mentioned in my initial comment.

    Best regards,
    Jordan Shannon

    #1118400

    Thanks, just got it running with modifying the code from Elliott.

    add_action( 'edit_form_after_title', 'enfold_customization_admin_styles', 100001 );
    function enfold_customization_admin_styles() {
        echo "<style type='text/css'>";
        echo ".post-type-post .avia-builder-button { display: none!important; }";
        echo "</style>";
    }

    Best regards,
    Niklas

    #1118448

    Hi Niklas,

    Great, I’m glad that you found a solution and thanks for sharing :-)

    Best regards,
    Rikard

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