Wordpress page coding ??

Discussion in 'HTML & Website Design' started by malikwiki, Mar 9, 2009.

  1. #1
    I want to make a page in a wordpress template in which side bars will not come ?? I mean side bars comes in the main index page but in one of the sub page side bar wont come ?? Can anyone tell me how to do this ????
     
    malikwiki, Mar 9, 2009 IP
  2. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #2
    I take it you're using the sidebar as an include as in <?php include(TEMPLATEPATH."/sidebar.php");?>
    If so then you need to add the include in your other pages that show posts, such as single.php, archive.php, etc
     
    qazu, Mar 9, 2009 IP
  3. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #3
    Which theme are you using?

    Anyways, you can create custom page layouts and choose the one you want whenever you add/edit a page, here's a quick and dirty way to do it:
    * Go to your theme directory
    * look for page.php and copy it to custom_page_1.php
    * edit custom_page_1.php and remove the php code "get_sidebar();" (the code that loads the sidebar)
    [!] in some themes you will find get_sidebar('something') instead of get_sidebar()
    * You may also want to remove any surounding html markup

    You should read this for more info: http://codex.wordpress.org/Pages
     
    nabil_kadimi, Mar 9, 2009 IP
  4. wp-themes

    wp-themes Banned

    Messages:
    230
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    WordPress uses a specific structure to load custom themes pages, and you need to modify all of them instep to show on your whole blog site wide pages ;)
     
    wp-themes, Mar 9, 2009 IP
  5. malikwiki

    malikwiki Active Member

    Messages:
    563
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #5
    thanks for your advise..I have removed the sidebars of the sub page but now the problem is I cant able to increase the width of that sub page ,..now ????
     
    malikwiki, Mar 9, 2009 IP
  6. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #6
    Wordpress themes are different, so we can give you an answer without knowing the theme you are using.
     
    nabil_kadimi, Mar 10, 2009 IP
  7. j0563

    j0563 Guest

    Messages:
    153
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You will have to modify your css file to include new <div>'s that are wider than the normal content area to make up for the lost space from your sidebars not being there.
     
    j0563, Mar 10, 2009 IP