• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to user navigation

PopWP

WordPress and Genesis Tutorials

  • Get Started
  • About
  • Archive
  • Services
  • Membership
  • My Account

Full Width Page Template in Genesis for Beaver Builder and Elementor

Last Updated on May 31, 2018 Favorited: 0 times

Genesis child themes come with various features and widgets, however, sometimes we use page builders like Beaver Builder and Elementor to design quick great looking pages.

Well, I don’t say anything bad or good about page builders as they are good for newbie designers and we can easily create a great looking site within few minutes.

Let’s see how you can use a custom template for page builders in Genesis child theme.

Case 1. Manual Template Selection

We generally not design all the pages but want to design some of the pages using page builders so we are using custom templates in Genesis to control the template using Page attributes section.

Step 1

Create a file named say, template-full-width.php in your child theme directory and paste the following code.

<?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();

Step 2

Add this CSS to your child theme’s style.css

/* Full Width Page
------------------------------------------------------ */

.site-inner.full-width {
    max-width: none;
    padding: 0;
    margin: 0;
}

Apply Full-Width template on the particular single page from the default editor “Page Attributes“.

Publish. and start working with Your Page builder.

Case 2. Auto Template Selection

WordPress offers auto template for some pages like front-page.php page.php -archive.php and more.

To use Page builder on the front page ie. home page,
Make sure you have a static page set in the Reading setting. if not,

a) Create a Page titled say, ‘Home’
b) Go to Reading setting >> Select the Homepage: Home
c) You can create a Blog page and can use it for Post page in Reading setting. Read more about this here and here.
d) Create a file named front-page.php in the child theme directory having:

<?php

get_template_part( 'template', 'full-width' );

Important:

Don’t forget to sprinkle a pinch of CSS.

/* Full Width Page
------------------------------------------------------ */

.site-inner.full-width {
    max-width: none;
    padding: 0;
}

Similarity you can create an auto template for page.php (single). Create a file page.php and place the same code from Case 2. d)

<?php

get_template_part( 'template', 'full-width' );

Enjoy.

Reference:

How to Create Custom Template in Genesis

Related Posts

  • Post list design showing featured image when hovered in Genesis
  • Gutenberg Page Template for Genesis
  • Landing Page Design Template with Background Image in Genesis
  • Widgetized Landing Page in Genesis
  • Landing Page template in Genesis

Categories: Free Content, Genesis Tutorials Tags: Beaver Builder, Elementor, Template

Reader Interactions

Primary Sidebar

Search

WPEngine WordPress Hosting, Perfected.

Hosting You are looking for?.
Perfect solution for small business to global enterprise.

Learn more

StudioPress Genesis Theme Framework

The No.1 Theme Provider.
Creative, SEO rich Theme for all niche projects.

Learn more

Categories

  • Free Content
  • Genesis Tutorials
  • Premium Content
  • Snippets
  • What's New?
  • WordPress Tutorials

Tag Cloud

Archive Background Section blog canvas menu center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect eNews Extended Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout left menu Logo menu Navigation Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress by Aryan Raj

  • Contact
  • FAQ
  • Disclaimer
  • Privacy Policy
  • Copyright Policy
  • Terms of Service