Tagged: advanced layout builder, page templates
Is it possible when a new page or post is created to automatically activate the advanced layout builder and a specific page template?
Hey NicomIT,
Thank you for the inquiry.
You can automatically enable the Advanced Layout Builder after creating a post, but applying a saved template will require more customization beyond the scope of support. Please add this code to the 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');
Thread: https://kriesi.at/support/topic/bulk-enable-advanced-layout-builder-on-pages/#post-1102304
Best regards,
Ismael
Thanks for providing that code Ismael.
Is there any documentation or info that you can provide when it comes to the requirement I described related to the page template? Anything along those lines that would help our development team would be great.
Hi,
Thanks for your patience but we don’t have any documentation for this as it is not a feature.
Perhaps you could create a template page and use the duplicate option each time you want to create a new page based on the template:
Or you could just load the template via the template option:
Best regards,
Mike