WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] get_sidebar makes footer and admin bar vanish (4 posts)

  1. craigdoesdesign
    Member
    Posted 1 year ago #

    Hi

    I'm using Starkers as a base for a new theme and need to add a sidebar which Starkers does not have included.

    I have managed to update the functions.php file and have created a sidebar.php file but when I add <?php get_sidebar ?> the footer and admin bar vanish from the page.

    However if I take the content of the sidebar.php file and place it in where <?php get_sidebar ?> would normally be then the problem does not occur.

    I have checked the footer and wp_footer() is in there.

    Any clues as to what's going wrong?

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    enable DEBUG while you are working on your site - http://codex.wordpress.org/Debugging_in_WordPress

    if you have entered as you have posted it here, then the syntax is wrong;

    should be:

    <?php get_sidebar(); ?>

    http://codex.wordpress.org/Function_Reference/get_sidebar

  3. craigdoesdesign
    Member
    Posted 1 year ago #

    Sorry, my mistake. That's how I have it. Just as you've written. I shall have a look at that debug.

    Thanks

  4. craigdoesdesign
    Member
    Posted 1 year ago #

    Success!

    With the aid of debug I found that the issue boiled down to trying to use the sidebar from the twenty eleven theme as a quick fix.

    I followed a basic tutorial at http://www.tastyplacement.com/add-sidebar-wordpress and I now have a working sidebar.

    Thanks Alchymyth

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.