• 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

gregnumber1man

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 2, 2016 at 1:24 am in reply to: Respecting Genesis layout options in Woocomerce #190625
    gregnumber1man
    Member

    Hi Brad,

    Thanks for your reply.

    I have tried both methods.

    If I completely uninstall the plugin, I can replicate the issue by creating a my-child-theme/woocommerce/archive-product.php file.

    Here are the contents of that file which will generate the 503 error:

    <?php
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    add_action( 'genesis_loop', 'woocommerce_content' );
    
    add_filter( 'genesis_pre_get_option_site_layout', 'my_function' );
    function my_function( $layout ) {
    	global $shop_page_id;
    	if ( get_post_meta( $shop_page_id, '_genesis_layout', true ) == null ) {
    		$layout = genesis_site_layout();
    		return $layout;
    	} else {
    		$layout = get_post_meta( $shop_page_id, '_genesis_layout', true );
    		return $layout;
    	}
    }
    
    genesis ();

    If I replace the code above with the following code, everything works fine:

    <?php
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    add_action( 'genesis_loop', 'woocommerce_content' );
    
    if ( get_post_meta( get_option( 'woocommerce_shop_page_id' ), '_genesis_layout', true ) == null ) {
    	add_filter( 'genesis_pre_get_option_site_layout', genesis_site_layout() );
    } else {
    	add_filter( 'genesis_pre_get_option_site_layout', 'my_function' );
    }
    
    function my_function( $layout ) {
    	$layout = get_post_meta( get_option( 'woocommerce_shop_page_id' ), '_genesis_layout', true );
    	return $layout;
    }
    
    genesis();

    What I would like to know is: why am I getting a 503 error using the first method?

    Regards,

    Greg

  • Author
    Posts
Viewing 1 post (of 1 total)

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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