mirror of
https://github.com/10h30/ycb.vn.git
synced 2026-07-11 18:56:17 +09:00
Add full width template
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
// Force full-width-content layout.
|
// Force full-width-content layout.
|
||||||
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
|
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
|
||||||
|
|
||||||
|
get_template_part( 'template', 'full' );
|
||||||
|
|
||||||
// Remove default page header.
|
// Remove default page header.
|
||||||
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
|
remove_action( 'genesis_after_header', 'business_page_header_open', 20 );
|
||||||
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
|
remove_action( 'genesis_after_header', 'business_page_header_title', 24 );
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
// Template Name: Full Width Page
|
||||||
|
|
||||||
|
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
|
||||||
|
/**
|
||||||
|
* Add the attributes from 'entry', since this replaces the main entry.
|
||||||
|
*
|
||||||
|
* @author Bill Erickson
|
||||||
|
* @link http://www.billerickson.net/full-width-landing-pages-in-genesis/
|
||||||
|
*
|
||||||
|
* @param array $attributes Existing attributes.
|
||||||
|
* @return array Amended attributes.
|
||||||
|
*/
|
||||||
|
function be_site_inner_attr( $attributes ) {
|
||||||
|
|
||||||
|
// Add a class of 'full' for styling this .site-inner differently
|
||||||
|
$attributes['class'] .= ' full';
|
||||||
|
|
||||||
|
// Add an id of 'genesis-content' for accessible skip links
|
||||||
|
$attributes['id'] = 'genesis-content';
|
||||||
|
|
||||||
|
// Add the attributes from .entry, since this replaces the main entry
|
||||||
|
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
|
||||||
|
|
||||||
|
return $attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display Header.
|
||||||
|
get_header();
|
||||||
|
|
||||||
|
// Display Content.
|
||||||
|
the_post(); // sets the 'in the loop' property to true. Needed for Beaver Builder but not Elementor.
|
||||||
|
the_content();
|
||||||
|
|
||||||
|
// Display Comments (if any are already present and if comments are enabled in Genesis settings - disabled by default for Pages).
|
||||||
|
genesis_get_comments_template();
|
||||||
|
|
||||||
|
// Display Footer.
|
||||||
|
get_footer();
|
||||||
Reference in New Issue
Block a user