0
的sidebar.php:要麼側邊欄或內容顯示,但不能兩者都在同一時間
的index.php:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php get_template_part('content', get_post_format()); ?>
<?php get_footer(); ?>
側邊欄顯示,但內容沒有。 如果我在內容之後放置側邊欄,則會顯示內容,而側邊欄不會。有什麼建議麼?
你從哪裏得到'wp_sidebar()'? – Cedon
它不屬於那裏嗎? :/ – Erin
它可能。但這不是WordPress的核心功能。這可能是一個插件需要的東西。但你的'sidebar.php'文件可以從字面上只是這個... https://github.com/Automattic/_s/blob/master/sidebar.php – Cedon