Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1469499

    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

    #1469503

    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

    #1469504

    Hi Mike

    That worked perfectly, much appreciated

    Regards
    Colin

    #1469506

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Advanced Editr as default except for product pages’ is closed to new replies.