2017-03-17 41 views
0

的sidebar.php:要麼側邊欄或內容顯示,但不能兩者都在同一時間

的index.php:

<?php get_header(); ?> 
<?php get_sidebar(); ?> 
<?php get_template_part('content', get_post_format()); ?> 
<?php get_footer(); ?> 

側邊欄顯示,但內容沒有。 如果我在內容之後放置側邊欄,則會顯示內容,而側邊欄不會。有什麼建議麼?

+0

你從哪裏得到'wp_sidebar()'? – Cedon

+0

它不屬於那裏嗎? :/ – Erin

+0

它可能。但這不是WordPress的核心功能。這可能是一個插件需要的東西。但你的'sidebar.php'文件可以從字面上只是這個... https://github.com/Automattic/_s/blob/master/sidebar.php – Cedon

回答

0

已解決! 我不知道什麼是錯,但我從頭開始側邊欄,並按照一步一步的教程。它正在工作。再次,不知道最初出錯的地方。感謝大家! :)