• 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

Remove static page/posts section from Front Page of Streamline Pro

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 › Remove static page/posts section from Front Page of Streamline Pro

This topic is: not resolved

Tagged: font page, remove, streamline pro

  • This topic has 5 replies, 2 voices, and was last updated 6 years, 9 months ago by Tal.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • December 13, 2016 at 8:39 am #197512
    Tal
    Member

    I've added a couple of extra widget areas and would like to remove the static page/posts section and sidebar from the home page in Streamline Pro - basically anything that should appear in the "site-inner" container.

    This could be done using remove_action in the functions file right? But I need some help in how to code it.

    Thanks

    December 13, 2016 at 11:55 am #197521
    Victor Font
    Moderator

    For the home page, you would edit front-page.php. You can put your remove actions in there or just delete the code you don't want.


    Regards,

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

    December 13, 2016 at 12:01 pm #197522
    Tal
    Member

    I did look but couldn't find anything that was obvious to me as relating to the part I wanted to remove...

    <?php
    /**
     * This file adds the Home Page to the Streamline Pro Theme.
     *
     * @author StudioPress
     * @package Streamline Pro
     * @subpackage Customizations
     */
    
    add_action( 'genesis_meta', 'streamline_home_genesis_meta' );
    /**
     * Add widget support for homepage. If no widgets active, display the default loop.
     *
     */
    function streamline_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) ) {
    	
    		//* Force content-sidebar layout setting
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
    	
    		// Add streamline-pro-home body class
    		add_filter( 'body_class', 'streamline_body_class' );
    	
    		// Add homepage widgets
    		add_action( 'genesis_before_content_sidebar_wrap', 'streamline_homepage_widgets' );
    
    	}
    }
    
    function streamline_body_class( $classes ) {
    
    	$classes[] = 'streamline-pro-home';
    	return $classes;
    	
    }
    
    function streamline_homepage_widgets() {
    
    	if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-3' ) ) {
    
    		echo '<div class="home-featured">';
    	
    		genesis_widget_area( 'home-featured-1', array(
    			'before' => '<div class="home-featured-1 widget-area">',
    			'after'  => '</div>',
    		) );
    		
    		genesis_widget_area( 'home-featured-2', array(
    			'before' => '<div class="home-featured-2 widget-area">',
    			'after'  => '</div>',
    		) );
    		
    		genesis_widget_area( 'home-featured-3', array(
    			'before' => '<div class="home-featured-3 widget-area">',
    			'after'  => '</div>',
    		) );
    
    		echo '</div><!-- end #home-featured -->';	
    
    	}
    
    }
    
    genesis();
    
    December 13, 2016 at 12:29 pm #197525
    Victor Font
    Moderator

    You'll need to edit one line and add another.

    Change this line:

    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );

    to

    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

    Then, in the same function, add:

    //* Remove the default Genesis loop
    remove_action( 'genesis_loop', 'genesis_do_loop' );

    The first change gets rid of the sidebar. The second removes the posts.


    Regards,

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

    December 13, 2016 at 12:48 pm #197530
    Tal
    Member

    Thanks.
    I don't know why, but that doesn't change anything.

    December 13, 2016 at 12:55 pm #197532
    Tal
    Member

    I moved both those outside of that function and it works, thanks

  • 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