Tagged: Advanced, avia, builder, Layout Builder, post types, posts
-
AuthorPosts
-
August 11, 2015 at 4:02 pm #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 usingadd_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 9 years, 3 months ago by jjsanderson.
August 11, 2015 at 5:09 pm #486075Hi 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!
ElliottAugust 11, 2015 at 5:32 pm #486087Ah, 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!
August 11, 2015 at 8:28 pm #486172Hi!
Alrighty, let us know if you have any other questions.
Best regards,
ElliottJuly 13, 2019 at 2:48 pm #1118328Hi,
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.
July 13, 2019 at 3:16 pm #1118336Hi,
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 ShannonJuly 13, 2019 at 3:34 pm #1118342Hi,
thanks for your help.
Is there even a way to do that in the style.css or functions.php of the child-theme?July 13, 2019 at 3:41 pm #1118343Hi,
You can add it to the page I mentioned in my initial comment.
Best regards,
Jordan ShannonJuly 13, 2019 at 9:34 pm #1118400Thanks, 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,
NiklasJuly 14, 2019 at 6:08 am #1118448 -
AuthorPosts
- You must be logged in to reply to this topic.