Trying to change content widh on child theme…

Asked on November 2, 2016 in Development.

Trying to change content width on child theme but its not working.


add_filter( 'layers_set_content_width', 'layers_child_set_content_width', 2, 2 );

if( ! function_exists( 'layers_child_set_content_width' ) ) {

function layers_child_set_content_width() {

global $content_width;
if( is_page_template( LAYERS_BUILDER_TEMPLATE ) ) {

$content_width = 1130;

} else if( is_page_template( 'template-both-sidebar.php' ) ||

is_page_template( 'template-left-sidebar.php' ) ||

is_page_template( 'template-right-sidebar.php' ) ){

$content_width = 770;

} elseif ( is_page_template( 'template-blog.php' ) ) {

$content_width = 1130;

} elseif( $left_sidebar_active || $right_sidebar_active ){

$content_width = 770;

}

}

}

inkcolor Layers User
Reply
0 Answer(s)