Skip to content

Instantly share code, notes, and snippets.

@seothemes
Created July 27, 2017 02:06
Show Gist options
  • Save seothemes/5c4d50b29417399aec61af62b6a13c43 to your computer and use it in GitHub Desktop.
Save seothemes/5c4d50b29417399aec61af62b6a13c43 to your computer and use it in GitHub Desktop.
Studio Pro Narrow Template
<?php
/**
* Template Name: Narrow Content
*
* This file adds the narrow content page template to the Studio Pro Theme.
*
* @package Studio Pro
* @author SeoThemes
* @license GPL-2.0+
* @link https://seothemes.com/themes/studio-pro
*/
/**
* Add narrow page body class.
*
* @param array $classes Array of body classes.
* @return array $classes Updated array of body classes.
*/
function studio_add_narrow_body_class( $classes ) {
$classes[] = 'narrow-content';
return $classes;
}
add_filter( 'body_class', 'studio_add_narrow_body_class' );
// Force full width content layout.
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );
// Run the Genesis loop.
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment