最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

woocommerce offtopic - Is it possible to add a sidebar to Storefront's Welcome page

programmeradmin3浏览0评论

This is probably an easy question but I'm having so much trouble figuring it out on my own.

I installed Storefront (the official Woocommerce theme) on a test server and I like it a lot, but the default front page (called Welcome) does not have a sidebar, which is a deal-breaker for me. I've been trying to add one with no luck, is this something that I'd need to do extensive template modifications to make work, or is there something easier (I'm fine with working with the PHP files and adding code and whatnot)

This is probably an easy question but I'm having so much trouble figuring it out on my own.

I installed Storefront (the official Woocommerce theme) on a test server and I like it a lot, but the default front page (called Welcome) does not have a sidebar, which is a deal-breaker for me. I've been trying to add one with no luck, is this something that I'd need to do extensive template modifications to make work, or is there something easier (I'm fine with working with the PHP files and adding code and whatnot)

Share Improve this question asked Nov 29, 2017 at 17:03 user3833000user3833000 112 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

I think there's an option to include it via the customizer (appearance->themes->customize)

If not, then you might need to open up content-homepage.php and put

<?php get_sidebar(); ?>

Where you want to display the sidebar.

If you cant do it via customiser you should be able to set it via the template or create a new template called Home with sidebar using something like this

   <?php
/*
Template name: Page - Home with Sidebar 
*/
get_header(); ?>
<div class="row">

<div id="content" class="large-9 right col" role="main">
    <div class="page-inner">
<?php while ( have_posts() ) : the_post(); ?>

            <?php the_content(); ?>
        <?php endwhile; // end of the loop. ?>
    </div><!-- .page-inner -->
</div><!-- end #content large-9 left -->

<div class="large-3 col col-first col-divided">
<?php get_sidebar(); ?>
</div><!-- end sidebar -->

</div><!-- end row -->
发布评论

评论列表(0)

  1. 暂无评论