WordPress.org

Ready to get started?Download WordPress

Forums

blank sidebar on pages (2 posts)

  1. mutedgirl
    Member
    Posted 9 years ago #

    I created several pages for my blog, and everything works fine (using Blix theme) I thought I'd get fancy and try including the sidebar on these pages using this code:

    <?php get_sidebar(); ?>

    And it works... sort of. The sidebar shows up.. but it's blank! Only on the pages though- on the main page and entries and archives, the sidebar is just fine. I've looked in sidebar.php to try to find something that might be causing this to not be showing up on the pages, but I can't find it. And everything I've searched for here in the forums doesn't apply. Any ideas? Thanks!

  2. Lorelle
    Member
    Posted 9 years ago #

    I'm not sure I understand exactly what you are doing, and without a site to look at, I can only guess. You cannot just add a sidebar inside of a post or page. PHP tags will not work unless you have added a plugin that forces them to work. But in this case, even that would be a disaster.

    To add a sidebar to your template files, you need to setup the style sheet to include the positioning specifics for the sidebar and add the get_sidebar() in the template file like page.php, index.php, single.php and others.

    Here is information that will help you figure out all of this:

    http://codex.wordpress.org/Stepping_Into_Templates
    http://codex.wordpress.org/Templates
    http://codex.wordpress.org/Customizing_Your_Sidebar

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags