WordPress.org

Support

Support » Themes and Templates » [Resolved] killing the sidebar

[Resolved] killing the sidebar

  • Neil Guevara
    Member

    @neil-guevara

    Hey guys, im wondering if someone could help me with something.

    Im wondering if its possible to kill the sidebar in certain posts on my blog i.e when i post pictures and then someone clicks on the links that that post appears without the sidebar and the content appears then in the middle of the page?

    possible?

    Thank guys!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Neil Guevara
    Member

    @neil-guevara

    no idea on this one guys?

    John
    Member

    @jberghem

    Maybe this link will help you.

    http://codex.wordpress.org/Category_Templates

    Neil Guevara
    Member

    @neil-guevara

    Figured out how to kiill the sidebar but havent been able to centre the content so that the pictures via category can fill the page…

    any ideas?

    I’m dying to know how to do this! If not per post, at least per ‘page.’ It would be so cool to choose when to use the sidebar and when not to.

    jbeckl – Check out the Page Templates on the codex for per page stuff. You could have a No Sidebar template or something.

    genevaeagles
    Member

    @genevaeagles

    jbeckl, maybe you’ll find something helpful here:
    http://wordpress.org/support/topic/173750?replies=3

    Neil Guevara, centering the picture could probably be managed with CSS…unfortunately I do not have the solution for you…not a pro…sorry…but hope it brings you on the right path at least.

    StrangeAttractor
    Member

    @strangeattractor

    Isn’t the default “Kubrick” theme set up this way — so that you can set up templates without the sidebar for single.php and it will display without the sidebar?

    Justin Tadlock
    WordPress God

    @greenshady

    You could always use a custom field to turn your sidebar off for individual posts:

    $no_sidebar = get_post_custom_values("No Sidebar");
    if($no_sidebar[0] == "true") :
    else :
    	get_sidebar();
    endif;

    Just set a custom field Key of “No Sidebar” and give it a Value of “true.”

    John
    Member

    @jberghem

    greenshady – Whoa! you just opened up the door for me to seeing the power of the custom field option in WordPress. Thanks a lot!

    Niel & jbeckl – If you’re new to WordPress or how to create themes, then download a whole bunch of themes and look at the code of features you like. You’ll learn how to do things quicker by seeing the code than just reading about them in the codex and figuring out how to do it yourself. When you’ve played around with bits and pieces of other themes, things will start to click on how things work and you’ll be able to create themes from scratch fairly easily.

    Good luck!

    ckschweiger
    Member

    @ckschweiger

    Can custom fields also be use to turn the side bar off for individual pages? If so, where exactly would I insert the code for this to work?

    Thanks for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] killing the sidebar’ is closed to new replies.