Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Template Name: Custom Full Width Page Template */
- add_filter( 'body_class', 'sk_body_class' );
- /**
- * Adds a css class to the body element
- *
- * @param array $classes the current body classes
- * @return array $classes modified classes
- */
- function sk_body_class( $classes ) {
- $classes[] = 'full-width';
- return $classes;
- }
- add_filter( 'genesis_attr_site-inner', 'sk_attributes_site_inner' );
- /**
- * Add attributes for site-inner element.
- *
- * @since 2.0.0
- *
- * @param array $attributes Existing attributes.
- *
- * @return array Amended attributes.
- */
- function sk_attributes_site_inner( $attributes ) {
- $attributes['role'] = 'main';
- $attributes['itemprop'] = 'mainContentOfPage';
- return $attributes;
- }
- // Remove div.site-inner's div.wrap
- add_filter( 'genesis_structural_wrap-site-inner', '__return_empty_string' );
- // Display header
- get_header();
- // Content
- the_post(); // sets the 'in the loop' property to true.
- the_content();
- // Display Footer
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment