Question on Sidebar content depending on length of page

Discussion in 'WordPress' started by MiletNZ, Oct 4, 2010.

  1. #1
    Hey all.. Got another thing I'm stuck with on WP. It's to do with showing different content depending on how long the page is.

    Example - My home page isn't very long and all I have in my sidebar is one square advertisement, a subscribe form, page list and Tag cloud. But some of my posts are extremely long and the sidebar is just a long empty amount of Grey.

    What can I do to fill this with some sort of content? Whether it's ads or whatever? And I want to keep my Home page at the length it's at - Nice and small.

    I suppose I could put my posts on different pages but how hard is that to do and would it deter readers from reading?
     
    MiletNZ, Oct 4, 2010 IP
  2. WC Rocket

    WC Rocket Member

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Modify your sidebar.php and include a widget area that only appears on single.php EG( <?php if is_single(); { ?> ##WIDGET AREA## <?php } ?>)
     
    WC Rocket, Oct 5, 2010 IP
  3. MiletNZ

    MiletNZ Member

    Messages:
    283
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    30
    #3
    Thanks, can you please elaborate on this answer?
     
    MiletNZ, Oct 9, 2010 IP
  4. WC Rocket

    WC Rocket Member

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #4
    Your theme sidebar template most likely contains a widget area on the sidebar. This area allows you to insert widgets from the WordPress widget manager. You can modify the sidebar template to include an additional sidebar widget area that only shows up on posts. You can use the is_single php tag to load the additional sidebar only when a post is being displayed. When a post is not being displayed, only the original sidebar widget area loads.
     
    WC Rocket, Oct 11, 2010 IP