WordPress.org

Forums

hide sidebar when reading posts (3 posts)

  1. azsquall
    Member
    Posted 7 years ago #

    hi guys!
    I'm new to coding like this and I've been baffled about how to make this possible.
    I'd like to make the side gone whenever one read a post so that the entire body bloc can be saved for the post' contents. is it possible?

    My site is http://atomiknet.com/wordpress

    any insight will be so great!!
    thanks!!!

  2. Len
    Member
    Posted 7 years ago #

    In single.php simply get rid of the call to the sidebar >>> <?php get_sidebar(); ?>

    On individual post pages the sidebar will not appear. Of course it may look a little strange now so you might want to take it a few steps further. For instance, creating 2 new classes: 1 for the index page and 1 for the post pages. Example, index.php you could have something like,

    <div id="content" class="narrowcolumn">

    which is defined in the style sheet as being 400px wide while in single.php you could have,

    <div id="content" class="widecolumn">

    which is defined in the style sheet as being 500px wide. Study the default Kubrick theme to see how this works.

  3. azsquall
    Member
    Posted 7 years ago #

    thanks millions! I will try out!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags