• 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

White page of death Outreach Pro – front-page.php issue

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 › White page of death Outreach Pro – front-page.php issue

This topic is: resolved

Tagged: extra widgets, front-page.php, Outreach Pro, White Page of Death

  • This topic has 16 replies, 4 voices, and was last updated 7 years, 9 months ago by Becky Lundin.
Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • August 22, 2015 at 7:54 pm #163206
    Becky Lundin
    Participant

    I have ended up with the "White Page of Death" on my clients site when I updated everything. I've narrowed it down to the front-page.php file, but can't figure out why my added code is breaking it, when it worked perfect before. I just updated WP, Genesis, and Outreach Pro. As long as I just use the front-page.php code that comes with the theme it works fine.

    The front page code that I added is for 2 extra widgets:

    //* Add extra home bottom widgets
    add_action( 'genesis_before_footer', 'outreach_extra_home_bottom_widgets', 1 )

    //* Add extra home bottom widgets 1
    add_action( 'genesis_before_footer', 'outreach_extra_home_bottom_widgets-1', 4 )

    //* Add home bottom widgets
    add_action( 'genesis_before_footer', outreach_home_bottom_widgets', 3 );

    function outreach_extra_home_bottom_widgets() {

    genesis_widget_area( 'extra-home-bottom', array(
    'before' => '<div class="extra-home-bottom widget-area">',
    'after' => '</div>',
    ) );

    }
    function outreach_extra_home_bottom_widgets_1() {

    genesis_widget_area( 'extra-home-bottom-1', array(
    'before' => '<div class="extra-home-bottom-1 widget-area">',
    'after' => '</div>',
    ) );

    }

    The site is: http://mountrainierspa.com/

    You can see how it used to look here: https://web.archive.org/web/20141218044737/http://mountrainierspa.com/

    Any help greatly appreciated!

    http://mountrainierspa.com/
    August 22, 2015 at 8:30 pm #163209
    Victor Font
    Moderator

    Where are you registering the widget areas? You can't initialize widget areas in front-page unless you've registered them first in functions.php. Chances are good that you overwrote functions.php when you updated Outreach Pro.


    Regards,

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

    August 23, 2015 at 11:22 am #163236
    Becky Lundin
    Participant

    Hi Victor. Thanks for the reply.

    I should have added that yes, the widget areas are registered in functions.php. I did have to reload my file since as you noted they were overwritten when I updated Outreach Pro.

    All of the coding is exactly the same, which is why I don't understand why it is not working.

    Would it be helpful for me to list the functions.php code that I added here to be looked at?

    Thanks again! 🙂

    August 24, 2015 at 7:32 am #163297
    Victor Font
    Moderator

    Yes, it would be helpful. Also, when you post code in these relies, mark them as code from the menu button. Highlight the code and click the button. This way your code retains its formatting. When you just copy and paste code into these replies, the system changes straight quotes to curly quotes. Curly quotes will break php every time.


    Regards,

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

    August 24, 2015 at 5:36 pm #163354
    Becky Lundin
    Participant

    Victor - these are the theme functions.php that I added:

    //* Register widget areas
    
    genesis_register_sidebar( array(
    	'id'          => 'extra-home-bottom',
    	'name'        => __( 'Extra - Home - Bottom', 'custom' ),
    	'description' => __( 'This is the extra bottom section of the Home page.', 'custom' ),
    ) );
    
    genesis_register_sidebar( array(
    	'id'          => 'extra-home-bottom-1',
    	'name'        => __( 'Extra - Home - Bottom - 1', 'custom' ),
    	'description' => __( 'This is the extra bottom section of the Home page.', 'custom' ),
    ) );

    This is the entire coding for the front-page.php that gives it the white screen of death:

    <?php
    /**
     * This file adds the Home Page to the Outreach Pro Theme.
     *
     * @author StudioPress
     * @package Outreach Pro
     * @subpackage Customizations
     */
    
    add_action( 'genesis_meta', 'outreach_home_genesis_meta' );
    /**
     * Add widget support for homepage. If no widgets active, display the default loop.
     *
     */
    function outreach_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-bottom' ) ) {
    
    		//* Force full-width-content layout setting
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    		
    		//* Add outreach-pro-home body class
    		add_filter( 'body_class', 'outreach_body_class' );
    		
    		//* Remove breadcrumbs
    		remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    
    		//* Remove the default Genesis loop
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    		
    		//* Add home top widgets
    		add_action( 'genesis_loop', 'outreach_home_top_widgets' );
    
    		//* Add extra home bottom widgets
    		add_action( 'genesis_before_footer', 'outreach_extra_home_bottom_widgets', 1 );
    
    		//* Add extra home bottom widgets 1
    		add_action( 'genesis_before_footer', 'outreach_extra_home_bottom_widgets-1', 4 );
    		
    		//* Add home bottom widgets
    		add_action( 'genesis_before_footer', outreach_home_bottom_widgets', 3 );
    
    	}
    
    }
    
    function outreach_body_class( $classes ) {
    
    	$classes[] = 'outreach-pro-home';
    	return $classes;
    	
    }
    
    function outreach_home_top_widgets() {
    
    	genesis_widget_area( 'home-top', array(
    		'before' => '<div class="home-top widget-area">',
    		'after'  => '</div>',
    	) );
    	
    }
    
    function outreach_extra_home_bottom_widgets() {
    
    	genesis_widget_area( 'extra-home-bottom', array(
    		'before' => '<div class="extra-home-bottom widget-area">',
    		'after'  => '</div>',
    	) );
    	
    }
    
    function outreach_home_bottom_widgets() {
    	
    	genesis_widget_area( 'home-bottom', array(
    		'before' => '<div class="home-bottom widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    
    }
    
    function outreach_extra_home_bottom_widgets_1() {
    
    	genesis_widget_area( 'extra-home-bottom-1', array(
    		'before' => '<div class="extra-home-bottom-1 widget-area">',
    		'after'  => '</div>',
    	) );
    	
    }
    
    genesis();

    When I take the following code out, then the site works, but not the custom widgets of course:

    //* Add extra home bottom widgets
    		add_action( 'genesis_before_footer', 'outreach_extra_home_bottom_widgets', 1 ); 
    
    		//* Add extra home bottom widgets 1
    		add_action( 'genesis_before_footer', 'outreach_extra_home_bottom_widgets-1', 4 );
    August 24, 2015 at 6:34 pm #163359
    Brad Dalton
    Participant

    Change debug to TRUE in wp-config.php which will give you the error and line number.


    Tutorials for StudioPress Themes & WooCommerce.

    August 24, 2015 at 9:32 pm #163366
    Becky Lundin
    Participant

    Thanks Brad. I changed it to "true", but not sure what to do next. How do I get the error and line number?

    I am not a programmer, obviously. 😉

    August 24, 2015 at 9:57 pm #163382
    coralseait
    Member

    The problem is here:

    //* Add home bottom widgets
    add_action( 'genesis_before_footer', outreach_home_bottom_widgets', 3 );

    At the end of your outreach_home_genesis_meta function, If that is exactly what front-page.php looks like.

    You are missing a single quote starting around outreach_home_bottom_widgets',3 );

    It should be:

    //* Add home bottom widgets
    add_action( 'genesis_before_footer', 'outreach_home_bottom_widgets', 3 );

    Coral Sea IT

    August 25, 2015 at 12:03 am #163391
    Brad Dalton
    Participant

    Reload the page and it will give you the error which @coralseait has picked up.


    Tutorials for StudioPress Themes & WooCommerce.

    August 25, 2015 at 12:47 am #163393
    Becky Lundin
    Participant

    Thanks Coral Sea - good eyes! 🙂

    I fixed that (I probably forgot to correct my old backup file on my computer when I was originally building the site), but when I loaded the corrected version I still get the white page of death.

    This site, with that coding, worked perfect for months. http://mountrainierspa.com/

    I can't figure out why it won't accept that code. I can leave the site as it is, but I had the custom widgets working fine before, and there is a sister site to this one with the same issue.

    August 25, 2015 at 12:49 am #163394
    Becky Lundin
    Participant

    Thanks Brad - I put the code for the extra widget areas back up and still getting white page with no error message. I'll have to play with it more tomorrow.

    Appreciate everyone's time on this. 🙂

    August 25, 2015 at 12:53 am #163395
    coralseait
    Member

    Depending on your host / environment there should be an error.log or similar type file in your installation somewhere. Probably in your wp root / html_public folder. If you are on a host that uses cPanel you can dig around and find it.

    With debug true, you'll find entries near the bottom of the file corresponding to the problem.


    Coral Sea IT

    August 25, 2015 at 4:15 am #163402
    Victor Font
    Moderator

    Your function is named outreach_extra_home_bottom_widgets_1. In your add_action code, you are calling outreach_extra_home_bottom_widgets-1. Change the dash to an underscore.


    Regards,

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

    August 25, 2015 at 11:08 pm #163524
    Becky Lundin
    Participant

    Thanks coralseait - I'll check it out tomorrow. Appreciate your time.

    August 25, 2015 at 11:09 pm #163525
    Becky Lundin
    Participant

    Thanks Victor. That had been corrected - I just pulled up the old file when I posted it here. Good eyes though - and I sure appreciate your time!

    August 26, 2015 at 7:44 am #163564
    Victor Font
    Moderator

    I refactored your code a little bit. It runs in my local environment without error:

    function outreach_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-bottom' ) || is_active_sidebar('extra-home-bottom') || is_active_sidebar('extra-home-bottom-1') ) {
    
    		//* Force full-width-content layout setting
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    		//* Add outreach-pro-home body class
    		add_filter( 'body_class', 'outreach_body_class' );
    
    		//* Remove breadcrumbs
    		remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    
    		//* Remove the default Genesis loop
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    		//* Add home top widgets
    		add_action( 'genesis_loop', 'outreach_home_top_widgets' );
    
    		//* Add home bottom widgets
    		add_action( 'genesis_before_footer', 'outreach_home_bottom_widgets', 1 );
    
    	}
    
    }
    
    function outreach_body_class( $classes ) {
    
    	$classes[] = 'outreach-pro-home';
    	return $classes;
    
    }
    
    function outreach_home_top_widgets() {
    
    	genesis_widget_area( 'home-top', array(
    		'before' => '<div class="home-top widget-area">',
    		'after'  => '</div>',
    	) );
    
    }
    
    function outreach_home_bottom_widgets() {
    
    	genesis_widget_area( 'extra-home-bottom', array(
    		'before' => '<div class="extra-home-bottom widget-area">',
    		'after'  => '</div>',
    	) );
    
    	genesis_widget_area( 'extra-home-bottom-1', array(
    		'before' => '<div class="extra-home-bottom-1 widget-area">',
    		'after'  => '</div>',
    	) );
    
    	genesis_widget_area( 'home-bottom', array(
    		'before' => '<div class="home-bottom widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    
    }

    Regards,

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

    August 31, 2015 at 12:24 am #164091
    Becky Lundin
    Participant

    Thank you everyone for your help. Even deleting Genesis and Outreach Pro, and reinstalling and activating them, without putting in my custom code, the site keeps going to the white screen after a while. I'm thinking it is a plug in issue that is corrupting the code. I have turned this over to someone else to figure out.

    I really appreciate all the tips and help!

    I'll mark this thread as resolved.

  • Author
    Posts
Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘White page of death Outreach Pro – front-page.php issue’ is closed to new 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