WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] killing the sidebar (11 posts)

  1. Neil Guevara
    Member
    Posted 6 years ago #

    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!!

  2. Neil Guevara
    Member
    Posted 6 years ago #

    no idea on this one guys?

  3. jberghem
    Member
    Posted 6 years ago #

    Maybe this link will help you.

    http://codex.wordpress.org/Category_Templates

  4. Neil Guevara
    Member
    Posted 6 years ago #

    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?

  5. jbeckl
    Member
    Posted 6 years ago #

    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.

  6. nickohrn
    Member
    Posted 6 years ago #

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

  7. genevaeagles
    Member
    Posted 6 years ago #

    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.

  8. StrangeAttractor
    Member
    Posted 6 years ago #

    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?

  9. Justin Tadlock
    Member
    Posted 6 years ago #

    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."

  10. jberghem
    Member
    Posted 6 years ago #

    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!

  11. ckschweiger
    Member
    Posted 6 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags