WordPress.org

Forums

/theme/sidebar.php not working! (3 posts)

  1. fruitbatinshades
    Member
    Posted 10 years ago #

    I'm new to wordpress so forgive me if this is a silly question. I have created an xhtml/css layout that works fine until I put into the php files. I'm assuming I'm copying the code into the wrong places.
    The xhtml in /them/sidebar.php does not get sent to the browser. My sidebar style is called #menu but the html generated is still called #sidebar. I've also added comments to the sidebar.php but they don;t get output so I'm assuming that it doesn't do what I'm expecting.

    What does <?php get_sidebar(); ?> return and where from?

  2. Michael Bishop

    Posted 10 years ago #

    I'm not too familiar with what you've said you've done, but the get sidebar call is in your index.php file and returns everything that is in that file. Usually, there is a <div> within sidebar.php file, that is defined in your CSS.
    So the index is something like,
    header, content, sidebar, footer.
    That is, for a basic theme with sidebar on the right. Obviously, if it were to be to the left, then you'd swap the sidebar and content order.

  3. yami
    Member
    Posted 10 years ago #

    http://codex.wordpress.org/Include_Tags

    It returns the sidebar.php file from your current theme's directory, or from the default theme directory if your current theme doesn't have a file called sidebar.php. Make sure the theme you're editing is activated by going to the 'Presentation' panel in your WP-admin.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.