Archived topic
Hide menu and header on checkout / Add image on checkout
1 reply · Started by Lucas on December 24, 2018
Hello guys. I just bought GP yesterday. I will be using the checkout more than anything, thus wanted something reliable and fast.
I have 2 questions:
1) How can I hide the header and menu completely on the checkout ONLY?
2) How can I add an image right above the checkout information?
This image shows what I want to achieve: http://prntscr.com/lz75bn
Hi there,
1) Try creating a layout element:
https://docs.generatepress.com/article/layout-element-overview/#disable-element
Then use this PHP snippet:
add_filter( 'generate_layout_element_display', function( $display, $element_id ) {
if ( 10 === $element_id && is_checkout () ) {
$display = true;
}
return $display;
}, 10, 2 );
https://docs.generatepress.com/article/generate_layout_element_display/
https://docs.woocommerce.com/document/conditional-tags/#section-9
Adding PHP: https://docs.generatepress.com/article/adding-php/
Make sure to change the number before $element_id
2) That page is entirely from WooCommerce itself so you will need to find a WooCommerce hook to do so:
https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/