Hi
I know it’s possible to make ALB editor the default by using the code below but is it possible to make it default on pages/posts but NOT for Woocommerce product pages?
/************************************************
* FORCE ADVANCED EDITOR
************************************************/
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’);
Regards
Colin
Hey waveseven,
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor instead:
function trigger_alb_on_load() {
?>
<script>
(function($){
$(window).load(function() {
if (!$('body').hasClass('woocommerce-admin-page')) {
$("#avia-builder-button").trigger('click');
}
});
})(jQuery);
</script>
<?php
}
add_action('admin_head-post-new.php', 'trigger_alb_on_load');
add_action('admin_head-post.php', 'trigger_alb_on_load');
Best regards,
Mike
Hi Mike
That worked perfectly, much appreciated
Regards
Colin
Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike