• Skip to main content
  • Skip to primary sidebar

WordPress, Genesis Framework and Storefront customization tutorials

  • Archive
    • Free
    • Premium
  • Blog
  • About
  • Contact
  • Newsletter
  • Login
Home » Storefront » Page 2

Storefront

Remove sidebar from single product page in Storefront

// =========================================================================
// REMOVE SIDEBAR FROM SINGLE PRODUCT PAGE IN STOREFRONT
// =========================================================================
add_action( 'get_header', 'wpninja_remove_storefront_sidebar' );
 
function wpninja_remove_storefront_sidebar() {
    if ( is_product() ) {
        remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
        add_filter( 'body_class', function( $classes ) {
            return array_merge( $classes, array( 'page-template-template-fullwidth page-template-template-fullwidth-php ' ) );
        } );
    }
}

Filed Under: Free Tagged With: Storefront

Conditionally add Full-Width Layout for Storefront with ACF and custom body_class

Create a True / False custom field with ACF Pro

Add this to functions.php

// =========================================================================
// FULL WIDTH CHECKBOX
// =========================================================================
function add_full_width_layout(){
     if( get_field('full_width') ){
remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );
       add_filter( 'body_class', function( $classes ) {
            return array_merge( $classes, array( 'page-template-template-fullwidth page-template-template-fullwidth-php ' ) );
        } );
    } 
}
add_action( 'wp', 'add_full_width_layout' );

Filed Under: Free Tagged With: Storefront

Remove Storefront built-in homepage sections

function remove_storefront_home_sections( $args ) {
    remove_action( 'homepage', 'storefront_product_categories', 20 );
    remove_action( 'homepage', 'storefront_recent_products', 30 );
    remove_action( 'homepage', 'storefront_featured_products', 40 );
    remove_action( 'homepage', 'storefront_popular_products', 50 );
    remove_action( 'homepage', 'storefront_on_sale_products', 60 );
    remove_action( 'homepage', 'storefront_best_selling_products', 70 );
}
add_action( 'wp', 'remove_storefront_home_sections' );

Filed Under: Free Tagged With: Storefront

Hide specific Flat Rates when Free Shipping is available

//Hide specific Flat Rates when Free Shipping is available
add_filter( 'woocommerce_package_rates', 'conditionally_hide_shipping_methods', 100, 2 );
function conditionally_hide_shipping_methods( $rates, $package ) {
    // HERE yours 2nd flat rate "Express Shipping" (that you never hide) in the array:
    $flat_rates_pickpack = array( 
        'wc_pont_shipping_method:3', 
        'local_pickup:9' 
    );

    $free = $flat2 = array();
    foreach ( $rates as $rate_key => $rate ) {
        // Updated Here To 
        if ( in_array( $rate->id, $flat_rates_pickpack ) ) 
            $flat2[ $rate_key ] = $rate;
        if ( 'free_shipping' === $rate->method_id )
            $free[ $rate_key ] = $rate;
    }
    return ! empty( $free ) ? array_merge( $free, $flat2 ) : $rates;
}

Filed Under: Premium Tagged With: Storefront

How to fix collapsed checkout fields in Storefront (Bootstrap)

#customer_details .col-1,  
#customer_details .col-2  {
	width: 100%;
	max-width: 100%;
}
.woocommerce-input-wrapper {
	display: block !important;
	width: 100%;
}

Filed Under: Free Tagged With: Bootstrap, Storefront

Move Header Cart and Product Search before header in Storefront

// =========================================================================
//CHANGE DEFAULT STOREFRONT HEADER LAYOUT 
// =========================================================================
function remove_storefront_actions() {
	remove_action( 'storefront_header', 'storefront_product_search', 40 );
    remove_action( 'storefront_header', 'storefront_primary_navigation', 50 );
    remove_action( 'storefront_header', 'storefront_header_cart', 60 );
}
add_action( 'init', 'remove_storefront_actions' );

function add_top_bar_opening_wrap(){
    echo '<div class="top-bar">';
}
function add_top_bar_closing_wrap(){
    echo '</div>';
}

add_action( 'storefront_before_header', 'add_top_bar_opening_wrap', 1 );
add_action( 'storefront_before_header', 'storefront_header_cart', 2 );
add_action( 'storefront_before_header', 'storefront_product_search', 40 );
add_action( 'storefront_before_header', 'add_top_bar_closing_wrap', 50 );

Filed Under: Premium Tagged With: Storefront

How to Remove Homepage Title in Storefront

Storefront Homepage Page Template

//Hide Homepage Title - Storefront Homepage Page Template

add_action( 'wp', 'wpninja_storefront_remove_title_from_home_homepage_template' );
 
function wpninja_storefront_remove_title_from_home_homepage_template() {
    remove_action( 'storefront_homepage', 'storefront_homepage_header', 10 );
}

Storefront Default Page Template

//Hide Homepage Title - Storefront Default Page Template

add_action( 'wp', 'wpninja_storefront_remove_title_from_home_default_template' );
 
function wpninja_storefront_remove_title_from_home_default_template() {
    if ( is_front_page() ) remove_action( 'storefront_page', 'storefront_page_header', 10 );
}

Filed Under: Free Tagged With: Storefront

Hook revslider in Storefront


//HOOK REVSLIDER
add_filter( 'storefront_before_content', 'add_revslider' );

function add_revslider( $rev_slider ) {
    if ( is_front_page() ) {
        echo do_shortcode('[rev_slider alias="revslider"]');
    }
return $rev_slider;
}

Filed Under: Free Tagged With: Storefront

  • « Go to Previous Page
  • Page 1
  • Page 2

Primary Sidebar

Gabor Flamich

Hi! I'm Gabor.
I write tutorials on WordPress and WooCommerce.

MacBook

12 Essential Snippets for Genesis Developers

Subscribe to my Newsletter to view my basic collection of Genesis snippets that I use for my projects!

Sign Up for Free
  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube
UpdraftPlus Premium

Tags

ACF Ajax Analytics API Bootstrap Breadcrumb category CPT CSS fetch FSE Genesis Google Maps Gutenberg HTML Isotope JavaScript jQuery loop Map Menu Parallax PHP Rest API SASS SEO SQL Storefront SVG tab tag manager tags Taxonomy Tool upsell Webpack Wholesale WooCommerce WordPress WPML

Disclosure: Some of the links in this site are affiliate links. I will be paid a commission if you use this link to make a purchase.

  • Privacy Policy / Terms of Service
© 2026 WP Flames - All Right Reserved