• Resolved johnnydanger27

    (@johnnydanger27)


    So I’m having a bit of an issue.

    I have duplicated the fullwidth template included with Storefront in an attempt to create a new custom template based on a fullwidth layout.

    The problem is, where the included fullwidth template inserts the class .page-template-template-fullwidth-php before .content-area which has a 100% width, when I duplicate that same template the .right-sidebar class is inserted before .content-area which has a 73% width.

    What kind of voodoo is this? LOL There is no sidebar included in my page template. I can’t figure out how the theme is determining which class to apply?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Fernando a11n

    (@fhaps)

    Automattic Happiness Engineer

    @johnnydanger27 It’s hard to know what could be going wrong with the template you’ve created.

    At the following link you can find a useful tutorial that includes instructions on how to create a full-width template within any WordPress theme:

    https://www.wpbeginner.com/wp-themes/how-to-create-a-full-width-page-in-wordpress/

    I hope this helps!

    You can do it this way

    // Remove sidebar from shop, category product pages and single product pages
    function fjd_remove_sidebar_shop_page() {
    if ( is_shop() || is_tax( ‘product_cat’ ) || get_post_type() == ‘product’ ) {
    remove_action( ‘storefront_sidebar’, ‘storefront_get_sidebar’, 10 );
    }
    }
    add_action( ‘wp’, ‘fjd_remove_sidebar_shop_page’ );

    // Remove body class and change it into Fullwidth
    function fjd_remove_sidebar_class_body( $wp_classes ) {
    $wp_classes[] = ‘page-template-template-fullwidth-php’;
    return $wp_classes;
    }
    add_filter( ‘body_class’, ‘fjd_remove_sidebar_class_body’, 10 );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Storefront Theme Templates – Full Width pulling .right-sidebar class???’ is closed to new replies.