WordPress.org

Ready to get started?Download WordPress

Forums

Adding sidebar.php to single.php (7 posts)

  1. chabotjeff
    Member
    Posted 6 years ago #

    Hi. I tried the solutions I could find regarding adding sidebar to single.php but nothing worked correctly. I want to put the sidebar as it is on the index.php info the single story pages. Every time I try, it drops it down under the story content.

    I believe this should be simple. The first step adding <?php get_sidebar(); ?> before the footer as in index.php, but there must be something else. CSS? DIV classes?

  2. Michael Torbert
    WordPress Virtuoso
    Posted 6 years ago #

    This is a CSS and/or DIV issue. It depends on your layout. What is the link to your site?

  3. chabotjeff
    Member
    Posted 6 years ago #

    Hi. Sorry for a delayed response. The site I'm trying to add a sidebar to for the content pages is hd-report.com. Any insight would be appreciated.

  4. moshu
    Member
    Posted 6 years ago #

    Don't use the default theme. Get another theme that has the sidebar in every view:
    http://themes.wordpress.net
    What could be simpler?

  5. chabotjeff
    Member
    Posted 6 years ago #

    Hi. Thanks. The site is obviously in an evolutionary state - I was hoping to figure out how to do it to eventually create my own theme.

    Tried a few things I found on the forum but what I usually get is a right bar that sits down under the left (main column). I suppose this a CSS adjustment to allow the sidebar to align vertically to the top?

  6. moshu
    Member
    Posted 6 years ago #

    Just do a quick search for "sidebar down" or "sidebar down IE" and you will find hundreds of posts... all with the same simple solution.

  7. chabotjeff
    Member
    Posted 6 years ago #

    Just to close this topic, there are as the moderator says hundreds of posts on "sidebar down". What I have found is there are issues with IE and if there are any bits of broken code it will definitely break your page.

    That aside, if you are just looking to change the default 1-column layout of the single posts to a 2-column like the homepage, do the following.

    Go to sidebar.php and change "widecolumn" class to "narrowcolumn" as is on the index.php. Ad <?php get_sidebar(); /> above the footer call and you should be good to go.

Topic Closed

This topic has been closed to new replies.

About this Topic