Disable sidebar on post pages (Wordpress)

Discussion in 'CSS' started by Alexical, Jun 7, 2010.

  1. #1
    I'm setting up a photo blog, and I need a way to disable my sidebar on my post pages (where my photos will be) but still have it enabled on my front page. I'm sure that there's a way to do this, I just have no idea how.

    The site is http://survivingjapan.com

    I just started making it yesterday, so it's nowhere near complete, I'd just like to get the formatting down before anything else.

    Thanks in advance!
    -Alexical
     
    Alexical, Jun 7, 2010 IP
  2. extremephp

    extremephp Peon

    Messages:
    1,290
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Go to your dashboard, go to editor under appearance open post.php

    And go through it, and you will see a code naming include sidebar() or a function similar to it.

    Simply delete it , and its done. Or i can directly do it for you.


    Thanks.
     
    extremephp, Jun 7, 2010 IP
  3. pmek

    pmek Guest

    Messages:
    101
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Alexical,

    ExtremePHP is correct in some ways. a single post is displayed in the file single.php within your theme files. Open that up and find the code that says < ?php sidebar() ? > I'd just comment it out, so if you want it back you can get it easily < ?php // sidebar() ? >. (Minus the spaces.)
     
    pmek, Jun 10, 2010 IP
  4. dlb

    dlb Member

    Messages:
    203
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    35
    #4
    Are you making a theme from scratch or using a pre-existing one?
     
    dlb, Jun 10, 2010 IP
  5. windy

    windy Active Member

    Messages:
    1,093
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #5
    just delete < ?php sidebar() ? > in your single.php
     
    windy, Jun 11, 2010 IP
  6. KimiGermany

    KimiGermany Peon

    Messages:
    1,117
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I can't even open your blog :(
     
    KimiGermany, Jun 11, 2010 IP
  7. johagulo

    johagulo Peon

    Messages:
    879
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Open your single.php page and delete the line that mentions sidebar1 or sidebar2, and see which one works out correctly
     
    johagulo, Jun 12, 2010 IP