• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

landing page template width

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › landing page template width

This topic is: not resolved

Tagged: landing page

  • This topic has 5 replies, 4 voices, and was last updated 5 years, 1 month ago by Angelo.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 1, 2018 at 6:36 am #215957
    Annamarie
    Participant

    Hi
    My CSS is really rusty, my PHP is truly minimal, so I'm turning for help for what is a no-brainer for some.
    I have a landing page template that goes full-width - for which I'd actually like to have some margin. How do I do that? Here's the code I'm using.. Must have found it on the Genesis site when doing my design some two-three years ago. Thanks for help!

    <?php
    
    /*
    Template Name: Landing
    */
    
    // Add custom body class to the head
    add_filter( 'body_class', 'add_body_class' );
    function add_body_class( $classes ) {
       $classes[] = 'landing-page';
       return $classes;
    }
    
    // Force full width content layout 
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    // Remove header
    //remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    //remove_action( 'genesis_header', 'genesis_do_header' );
    //remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
    
    // Remove navigation
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    
    // Remove breadcrumbs
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs');
    
    // Remove footer widgets
    remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
    
    // Remove footer
    remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
    
    genesis();
    https://www.sharinghousing.com/homemate-compatibility-assessment-token-required/
    February 1, 2018 at 7:52 am #215964
    Victor Font
    Moderator

    Change the max-width setting in this CSS at line 649 in style.css:

    .site-inner, .wrap {
        margin: 0 auto;
        max-width: 1200px;
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 2, 2018 at 8:25 am #216038
    Annamarie
    Participant

    Wouldn't that change it for all my pages not just the landing page?

    My CSS is rusty, could I do?

    .landing-page .site-inner, .wrap {
    margin: 0 auto;
    max-width: 1200px;
    }

    Change max-width of course

    February 2, 2018 at 8:50 am #216039
    wputler
    Member

    Hi - it looks like you can target only your landing pages with:

    .page-template-page_landing .site-inner .content-sidebar-wrap {
         padding: 40px 80px;
    }
    February 2, 2018 at 9:20 am #216041
    Annamarie
    Participant

    Nope - doesn't hook and actually leaves some elements still in full width. Dang.

    February 2, 2018 at 9:34 pm #216047
    Angelo
    Member

    change your-theme-landing for your theme landing class, then Place it at the end of your stylesheet

    .your-theme-landing .wrap {
    max-width: 100%;
    }
    .your-theme-landing .wrap .entry{
    margin: 1%;
    }

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble