Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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 8 years, 10 months ago by CharlieTh.
    #452117

    Hey!

    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!
    Josue

    #452122

    Now, 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!

    #452135

    You are welcome, glad to help :)

    Regards,
    Josue

    #740973

    Is 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.

    #742720

    Hi,

    Try to change this part of the code:

    $(window).load(function() {

    to this one:

    $(document).ready(function() {

    Hope this helps.

    Best regards,
    Nikko

    #742844

    Very 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.

    #743157

    Hi,

    Glad that you made a workaround for that :)

    Best regards,
    Nikko

    #1175739

    Hi 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/

    #1176059

    Hi 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,
    Victoria

    #1226015

    Please close rthis if desired.

    #1226018

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Always open Advanced Layout Builder’ is closed to new replies.