How to put Left and Right Sidebar After page Content in Wordpress??

Discussion in 'WordPress' started by northwest, Mar 14, 2008.

  1. #1
    Hi,

    I wanted to know how to put the left and right sidebar contents after the page content. i.e. when I look at the HTML, I want to see the page contents before all the sidebar links and other things.

    THe reason for this because I want to the search engines to see the <h1> tag and the page contents that are optimized before looking at all the links on the sidebar.

    In some WP templates with only left sidebar, the <?php include (TEMPLATEPATH . "/l_sidebar.php"); ?> line after the content line and this will make the sidebar links' HTML appear after the content.

    But when there left and right sidebars, the code looks like:

    <?php include (TEMPLATEPATH . "/l_sidebar.php"); ?>

    <<page content>>

    <?php include (TEMPLATEPATH . "/r_sidebar.php"); ?>

    If I want the code to look like this:

    <<page content>>

    <?php include (TEMPLATEPATH . "/l_sidebar.php"); ?>

    <?php include (TEMPLATEPATH . "/r_sidebar.php"); ?>

    But when I put the code just above, the sidebar placements get all messed up. Is there anyway to make the content HTML appear before the left and right sidebar HTML??
     
    northwest, Mar 14, 2008 IP
  2. northwest

    northwest Peon

    Messages:
    277
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can anybody help with this??
     
    northwest, Mar 15, 2008 IP
  3. Brandon Sheley

    Brandon Sheley Illustrious Member

    Messages:
    9,721
    Likes Received:
    612
    Best Answers:
    2
    Trophy Points:
    420
    #3
    don't put a right column, the bots will read your post first
     
    Brandon Sheley, Mar 15, 2008 IP
  4. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #4
    ...or use a theme that has sidebar information at the bottom of the page.
     
    hmansfield, Mar 16, 2008 IP
  5. Bohol

    Bohol Peon

    Messages:
    2,680
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Each theme has its own functionality. That code may work in a theme but not in another theme.
     
    Bohol, Mar 16, 2008 IP
  6. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #6
    My thoughts exactly. When you start messing around with the absolute functions of the way a theme is designed, you will screw it up.
    You should find a theme that has the functions that you need.
    If you are making such drastic changes anyway, a new theme is hardly noticeable.

    What is noticeable, is a badly hacked theme, that doesn't show up well on both browsers.
    Trust me..I have been there.:)
     
    hmansfield, Mar 16, 2008 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This really isn't so much of a theme issue as it is an HTML/CSS issue. What I do is wrap all the contents of my #content DIV around a DIV with a class of "wrapper" and then put the sidebars after the #content DIV in my HTML source. Then I'll use CSS to float the columns (even the middle one) and some negative margins to snap them into place.

    Here's a 3 column example of what I'm talking about right here:
    http://www.dan-schulz.com/temp/3columnlayout/

    And a 4 column version as well:
    http://www.dan-schulz.com/temp/4columnlayout/
     
    Dan Schulz, Mar 16, 2008 IP
  8. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #8
    Would the fact that an H1 tag is being used make this less of an issue? as in even though you have some links being looked at by the SE's before your H1 tag, wouldn't the fact that the H1 tag in there and being used be enough for this to be less of a problem?
     
    pipes, Mar 17, 2008 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Are you asking about the thread starter's post or my examples?
     
    Dan Schulz, Mar 17, 2008 IP
  10. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #10
    The OP's post.
     
    pipes, Mar 17, 2008 IP
  11. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Ah, ok. Just wanted to make sure.
     
    Dan Schulz, Mar 17, 2008 IP
  12. northwest

    northwest Peon

    Messages:
    277
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I have heard that it does matter when the content shows right after <head> </head> tag. It made a difference on my websites about 2 years back. I think it is important if the 1st paragraph with the keywords appear right after the </head> tag.
     
    northwest, Mar 18, 2008 IP
  13. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Do that and your HTML will be invalid. ;) The only thing that should come immediatley after the </head> tag is the <body> tag.
     
    Dan Schulz, Mar 19, 2008 IP