2012-01-09 83 views
0

我有一个wordpress网站,其中有4个页面是一个博客页面。 我已经创建了博客页面的页面模板来显示此页面上的所有博客。 在此页面模板上,我显示了其他页面中的不同侧栏。 此侧边栏显示博客档案。如何为所有博客文章和博客上载的页面显示不同的侧边栏?

但是,当我点击一个存档时,侧边栏变成了第一个侧边栏,它也在另一个页面上。

我将如何保留这个第二个边栏以显示在每篇博客文章中?

在此先感谢。

回答

0
- In case of custom pages,for example we are having aboutus.php having body contents like 
    this - 

    <?php 
    /** 
    * Template Name: About us 
    * 
    * Selectable from a dropdown menu on the edit page screen. 
    */ 
    ?> 
    <?php get_header(); ?> 

    //body content for aboutus page 

    <?php include ('aboutus_sidebar.php'); ?>//separate sidebar for aboutus 
    <?php get_footer(); ?> 

- Then,create a file named aboutus_sidebar.php with whatever you want. 
相关问题