Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1213289

    Hi,
    Is is possible through a function (or even a class) to see on a page if the advanced layout builder is enabled or not?

    Thanks, Wz

    #1214278

    Hi,

    Thanks for contacting us!

    When ALB is enabled, “avia-advanced-editor-enabled” class is added to Body tag. Would it work for you? :)

    Best regards,
    Yigit

    #1214370

    Hi,
    No I meant the front-end, not the back-end.
    I can’t find any specific class present on the front-end when the ALB is activated.
    Greetings

    #1214984

    Hi,

    Please add following code to bottom of Functions.php file in Appearance > Editor

    add_filter( 'body_class', 'av_custom_class' );
    function av_custom_class( $classes ) {
    	global $wp_query;
    	$builder_stat = Avia_Builder()->get_alb_builder_status( $wp_query->post->ID );
    	if( ( 'active' == $builder_stat ) && ! is_preview() ) {
        	$classes[] = 'alb-enabled';
        }
        return $classes;
    }

    This should add “alb-enabled” to Body tag of pages that were created with ALB :)

    Best regards,
    Yigit

    #1214988

    Thank you very much!

    #1215032

    Hi,

    You are welcome! Let us know if you have any other questions or issues :)

    Best regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Check if advanced layout builder is enabled’ is closed to new replies.