Page narrow width

Insert below code at your php page

<?php
/**
 * Genesis Framework.
 *
 * Template Name: Narrow Width
 
 * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
 * Please do all modifications in the form of a child theme.
 *
 * @package Genesis\Templates
 * @author  StudioPress
 * @license GPL-2.0+
 * @link    http://my.studiopress.com/themes/genesis/
 */
 
 
//* Content narrow width
add_filter( 'body_class', 'genesis_sample_add_body_class' );
function genesis_sample_add_body_class( $classes ) {

	$classes[] = 'narrow-width';

	return $classes;

}

// This file handles pages, but only exists for the sake of child theme forward compatibility.
genesis();

Add below CSS at your style.css file

.full-width-content .content,
.narrow-width .content {
	float: none;
	margin-left: auto;
	margin-right: auto;
	max-width:900px;
}

When you create new page select 'Narrow Width' at Template dropdown

Copyright © 2024 Siam Naulak.
magnifiercrossmenu