2013-11-27 36 views
0

我有一个wp电子商务的博客,现在我想要做的是使用单独的侧边栏到商店页面,但WP电子商务似乎拉你的模板边栏,无法找到如何指定要使用的边栏。与WP-Ecommerce不同的侧边栏

我在我的functions.php创造了一个新的工具条只是不知道在哪里把它称作......

任何帮助非常赞赏

感谢 乔

回答

0
As you have created a separate sidebar, now you must be seeing that in your admin panel. 

So just add the widgets you want to appear in the sidebar. 

Next go to your sidebar.php page, there you cana put a condition i.e. for the products page 

If your products page is a separate template then use the name of the file i.e. 

if (is_page_template('product.php')) { 
    register_sidebr('name of the sidebar'); 
} else { 
    register_sidebr('name of the sidebar'); 
} 
+0

woulde有是一种使其适用于所有WP电子商务页面的方法,或者我会为每个页面使用单独的if语句:)感谢 – user3041983

+0

上述代码适用于特定模板,是否需要为每个页面单独添加侧边栏? –

+0

没有只有2个侧边栏一个用于网站的主要部分,然后一个用于商店部分(产品页面,单个产品页面,类别页面和购物车页面)试图添加此代码也现在没有侧边栏显示任何地方:( – user3041983