• Resolved Betty Maszlay

    (@papireper)


    Could somebody please help me how can I add left sidebar to Homepage?
    I’m using Storefront theme with Woocommerce.

    On Homepage only footer-sidebars display but I need left sidebars.

    Left sidebars only display on blog page (and I do not want posts on Homepage but products).

    My page is this.

    Thank you in advance!

Viewing 10 replies - 1 through 10 (of 10 total)
  • @papireper The fastest way would be to create a copy of the homepage template, rename it like template-homepage2.php and add the code below before or after the #primary block.

    <?php do_action( 'storefront_sidebar' ); ?>

    After this, you’ll have to create some custom CSS to place sidebar on the left side.

    Note that you can’t do this on the template-homepage.php file as there’s a CSS for it to force the page to be in full width. Also, it is recommended to do your edits for this on a child theme. Hope this helps!

    Thread Starter Betty Maszlay

    (@papireper)

    Thank you @wooassist!
    I’ll try it soon and will take a feedback here!
    ??

    Any way doing this without messing around with code? Would be much appreciated! ??

    Hi there,

    Just trying to do what was recommended by ‘wooassist’.

    If I change the template to be template-homepage2, how do I ensure that my homepage calls that template and not the original template-homepage?

    Cheers
    Kristy

    Same question here as tandiSD:

    – Any way doing this without messing around with code?

    E g – any premium plugin, or so, that goes with this template?

    Cheers!

    Hi there, I had a similar thread, and James Koster (a key storefront contributor) advised me the below:


    You mean you want a sidebar on the homepage template? Unfortunately this isn’t an option and would require some customisation.

    Before <?php get_footer(); ?> in template-homepage.php you’d need to add <?php do_action( ‘storefront_sidebar’ ); ?> to display the sidebar.

    You’d then need to apply the appropriate css to fix the layout.”

    I think some of us (or quite a few) Storefront-users need an easier more code-free fix for this Kamkya, and James Koster ??

    Hi, if you’re looking for a cheats way to get content on the homepage without coding:

    -You can use the homepage content (editing the page home itself)
    OR
    -I’ve sneakily used the widget ‘footer bar’ and added text contents to it, to create some additional areas of static content on the homepage
    https://www.hecanterbury.co.nz/ (it’s not finished but it will give you an idea of the below)
    (My ‘need a site visit/get a trade account etc’ is one one ‘footer bar’ text block)
    (And my row of brands is in another ‘footer bar’ text block) – Simply set visibility on the widgets to be to display on the homepage only if you only want them to show on the home page.

    So these aren’t quite a sidebar, but it’s another way of getting any content on the homepage you like

    Thanks for advices Kamkya.
    And nice site ??

    Hello,

    Same question here as tandiSD:

    – Any way doing this without messing around with code?

    E g – any premium plugin, or so, that goes with this template?

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Need sidebar on Homepage’ is closed to new replies.