Tagged: advanced layout builder, ALB
-
AuthorPosts
-
May 31, 2015 at 3:49 am #452106
Can I make the Advanced Layout Builder open immediately?
For Post creators, it’s easier if they don’t get confused by having to press the button to open the ALB.
Is there a way to make that the “default editor” instead?
Figure you guys “know all”…
Thanks in advance!
I apologize if I’ve missed where you wrote about this, but I DID do quite a search.
BTW, saw this elsewhere, not here at Enfold — maybe somewhat the solution?
But what would be the name recognized by Enfold?Set default editor
Snippet below modifies the default editor in WordPress admin. You can go with the Visual Editor, or you can choose the HTML Editor, just add one of them into the functions.php file.
# This sets the Visual Editor as default
add_filter( ‘wp_default_editor’, create_function(”, ‘return “tinymce”;’) );
# This sets the HTML Editor as default
add_filter( ‘wp_default_editor’, create_function(”, ‘return “html”;’) );- This topic was modified 9 years, 4 months ago by CharlieTh.
May 31, 2015 at 4:18 am #452117Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function trigger_alb_on_load(){ ?> <script> (function($){ $(window).load(function() { $("#avia-builder-button").trigger('click'); }); })(jQuery); </script> <?php } add_action('admin_head-post-new.php', 'trigger_alb_on_load');
Cheers!
JosueMay 31, 2015 at 4:52 am #452122Now, really, Josue…I am OFFICIALLY spoiled.
You didn’t even let the bits and bytes dry on the page before you answered that one!Thanks! Made things SOOOOOOOO much easier!
Wow…just…WOW!
May 31, 2015 at 5:19 am #452135You are welcome, glad to help :)
Regards,
JosueFebruary 1, 2017 at 5:00 am #740973Is there by any chance any other way of accomplishing this? It does work, but it kind of loads the default editor then loads the avia ALB causing a noticeable flicker. IMHO it looks a bit unprofessional.
February 4, 2017 at 9:10 am #742720Hi,
Try to change this part of the code:
$(window).load(function() {
to this one:
$(document).ready(function() {
Hope this helps.
Best regards,
NikkoFebruary 4, 2017 at 4:38 pm #742844Very kind of you to chime in Nikko! I’m afraid $(document).ready() is too early since (for me anyway) repeatedly fails to load the ALB.
I did solve my particular issue with a slight modification though:// make avia default on new posts // use #postdivrich_wrap for editor only, #post-body for (pretty much) everything // see https://kriesi.at/support/topic/always-open-advanced-layout-builder/#post-452117 add_action('admin_head-post-new.php', 'trigger_alb_on_load'); function trigger_alb_on_load(){ echo '<style>#post-body { display: none; }</style>'; ?> <script> (function($){ $(window).load(function() { $("#avia-builder-button").trigger('click'); $("#post-body").css('display', 'inherit'); }); })(jQuery); </script> <?php }
This seems to work nicely. For me anyway.
February 6, 2017 at 6:32 am #743157Hi,
Glad that you made a workaround for that :)
Best regards,
NikkoJanuary 18, 2020 at 3:57 am #1175739Hi there,
I”m using a gravity forms to create new posts. I made my template using ALB and I copied the layout code and put it into the Post Body GF field, If I set that post to publish when the form is submitted, it looks like my site doesn’t recognize that it was built in ALB and page is formatted funny. Can I make it so ALB is set at the default so the page loads correctly without me having to go into the page draft to manually switch it to ABL and publish it?For reference: I found this article above ^^^ and this one https://kriesi.at/support/topic/avia-layout-builder-by-default/
January 19, 2020 at 7:06 pm #1176059Hi adoptionformychild,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
VictoriaJune 27, 2020 at 1:51 am #1226015Please close rthis if desired.
June 27, 2020 at 2:20 am #1226018Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Always open Advanced Layout Builder’ is closed to new replies.