Forum Replies Created
Viewing 1 post (of 1 total)
-
AuthorPosts
-
gregnumber1man
MemberHi 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
-
AuthorPosts
Viewing 1 post (of 1 total)