• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Gokul Deepak

Gokul Deepak

GoCool and Debug

  • Home
  • Terraform
  • WordPress
  • Android
  • How to
  • About Me

Genesis Sample Theme Full-Width Template

July 7, 2019 by Gokul Deepak S Leave a Comment

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;
}

Filed Under: Wordpress

About Gokul Deepak S

Leave a ReplyCancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular Pages

  • Home
  • How to find the date of the Facebook group it was created
  • Yureka Yu Plus vs Lenovo K3 Note
  • How to Install Windows without GRUB rescue
  • How to Remove LinkWithin logo under 'You Might Also Like' widget in blogger

Archives

Categories

  • Android
  • Apache
  • AWS
  • Blogger
  • Computer Tips
  • DevOps
  • Docker
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • Hosting
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Node JS
  • Notepad++
  • PostgresQL
  • Terraform
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One AWS Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS Notes OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Tomcat Wordpress plugin

Copyright © 2025 ยท Maintained by GokulDeepak

wpDiscuz