Genesis Sample Theme Full-Width Template

Front-page.php

<?php
// Template Name: Full Width
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
/**
 * Adds 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 ) {
    // Adds a class of 'full-width' for styling this .site-inner differently
    $attributes['class'] .= ' full-width';
    // Adds an id of 'genesis-content' for accessible skip links
    $attributes['id'] = 'genesis-content';
    // Adds the attributes from .entry, since this replaces the main entry
    $attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
    return $attributes;
}
// Displays header.
get_header();
genesis_do_breadcrumbs();
// Displays content.
the_post(); // sets the 'in the loop' property to true. Needed for Beaver Builder but not Elementor.
the_content();
// Displays comments (if any are already present and if comments are enabled in Genesis settings - disabled by default for Pages.
genesis_get_comments_template();
// Displays footer.
get_footer();

Style.css

/* Full Width Page
------------------------------------------------------ */.site-inner.full-width {
    max-width: none;
    padding: 0;
    margin: 0;
}
Gokul Deepak S

Recent Posts

Running crontab on AWS auto scaling group

Linux has a convenient feature of running cronjob which will get executed at the correct…

4 months ago

Learn with Gokul

As famous Tamil poet Auvaiyar said "Katradhu Kai Mann Alavu, Kallathathu Ulaga Alavu" which is…

4 months ago

Terraform Cheat sheet

Terraform Cheatsheet with pdf. You can download Terraform Cheatsheet pdf with all Terraform CLI commands…

4 months ago

Strategy to prepare for Terraform Associate Exam Preparation

I was planning to do Terraform certification a long time ago. I have worked on…

4 months ago

Runcloud vs SiteGround Comparision

As a user of both of these services has got multiple benefits with both of…

1 year ago

Important Docker Commands to remember

You need not memorize these important docker commands. Repeated usage will make it easy for…

1 year ago

This website uses cookies.