2012-01-09 118 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. 
相關問題