WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Removing the Sidebar and space (8 posts)

  1. descent1s1
    Member
    Posted 7 years ago #

    Hey everyone!

    I'd first like to say thanks for taking a look at my post, this is my first time posting on this forum. On the other hand, this is not my first time trying to look up how to remove the sidebar and the space it leaves behind.

    As you can see on my site: http://stirbinatorlabs.com/wordpress/?page_id=22
    I am trying to make my forum extend to fill the page, including the sidebar area.

    I have made a .php template for my page, and I have successfully removed the sidebar. I'm halfway there, and I know that now I have to edit the CSS or use conditional tags, but I am at a loss as to do that specifically. I have tried 'experimenting' with an offline version of my theme, and I still can't figure it out.

    I'm just a little frustrated right now and I'm hoping you guys could shed some light for me. I'd appreciate any help you could throw my way.

  2. Root
    Member
    Posted 7 years ago #

    In #page get rid of the tiling yukky green image.

    In #content increase the width.

  3. descent1s1
    Member
    Posted 7 years ago #

    Will this remove the sidebar "yukky green image" in that page specifically? Or will it remove the "yukky green" from all of the 'page' pages? Because I want to keep the sidebar on the other ones, just not the forum page.

    My apologies if I wasn't as detailed as I should have been. To reiterate: I want it to be removed on just that page.

    But I'll give it a go anyway and see what happens! Hope to hear some more ideas!

  4. Root
    Member
    Posted 7 years ago #

    In your use of the word *page* you may be under a misapprehension. Generally - unless there are alternative templates removing it once will do. WP does not have pages except for pages of static content. It has templates with dynamic content. :)
    But to answer the question. That question is not this question. This question has changed. What you need to do is save index.php as home.php then edit as above.

  5. descent1s1
    Member
    Posted 7 years ago #

    Root, thank you very much for your putting some info in, I really do appreciate it.

    So I'm guessing that you're answering the question, which was not about the specific page. And, since it's not about the specific page, that will rid me of the sidebars and the "yucky green" throughout my entire site, which is not what I am aiming for. Correct?

    So I believe I'm still looking for a way to rid myself of the sidebar and space on that specific page.

    I did a little extra reading, and in my theme, the get_sidebar command is in my page.php file. I made a copy of that file and renamed it forum.php, then I added this:

    <style>#sidebar { display: none; visibility: hidden; }</style>

    and then I added this:

    <?php
    /*
    Template Name: Forum
    */
    ?>

    at the very top of the page. Is this along the path of what I should do?

    Then, what I want to do, is delve into the style.css, copy the #page attributes and rename it to #forum. Then I'd be able to edit the width etc?

    Could I do the same with #content and change it to #content2? Then, say in my forum.php, I could change <div id=content> to <div id=content2>?

    I know I'm kinda swimming blind, but I feel I'm a little closer than I was when I started this thread.

  6. descent1s1
    Member
    Posted 7 years ago #

    Okay, now I'm 3/4 the way there!

    What I did to change the body, was create a "#content2" in the style.css.

    Then in the forum template I made, I changed <div id=content> to <div id=content2>. Now I'm able to extend my forum into the sidebar space.

    Now all I have to do is get rid of the "green yucky" on just that page.

    I know in the #page part of the style.css I can erase the url for the image, but that will erase that image all over my site, I just want it done from that page.

    What I'm trying to do, is find where <div id=page> is located, so maybe I can change copy the .php form, make my own with <div id=page2> and then change the call command for that .php in my forum template as well.

    From there, I can create a #page2 in my style.css, and get rid of the url...

    Well, so far! I've been able to locate the <div id=page> in the header.php. I copied it, and made a header2.php, same thing, but when I'm in my CSS editor, it shows up as "header2.php", instead of just "header" like the normal header.php.

    Because in my forum template, there is this code:

    <style>#sidebar { display: none; visibility: hidden; }</style>
    <?php
    /*
    Template Name: Forum
    */
    ?>
    
    <?php get_header(); ?>
    
      <div id="content2">
    
      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
        <div class="post" id="post-<?php the_ID(); ?>">
    
            <h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    		<span class="post-cat"><?php the_category(', ') ?></span> <span class="post-calendar"><?php the_time('F jS, Y') ?></span>
    
    		<div class="post-content">
    
    		<?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
    
    		<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    
    		<?php edit_post_link('Edit', '', ''); ?>
    
    		</div>
    
    		<?php comments_template(); ?>
    
    			<?php endwhile; else: ?>
    
    		<p>Sorry, no posts matched your criteria.</p>
    
    <?php endif; ?>
    
    	</div><!--/post -->
    
      </div><!--/content -->
    
    <?php get_footer(); ?>

    And if you can see, the get_header. I want to change that to get_header2.php. I tried that and it gave me an error when I opened up the page. What do you guys think I should do?

  7. Root
    Member
    Posted 7 years ago #

    I have to fess up. I can't follow what you are upto. But display:none is not the proper way for whole sidebars to go in and out of different setups. I wish I could help more. I still think my solution was neat.

  8. descent1s1
    Member
    Posted 7 years ago #

    I'm sorry for the confusion, Root. What I wanted to accomplish, was to be able to extend my forum across the area where the sidebar is. I would also have to remove the sidebar itself to do this, as well. The caveat is that I wanted to do it from just that page. All the other pages on the site will keep the sidebar and original width, etc.

    I'll start up another topic on how to remove the background picture from just that page as well. I could remove it from the entire site if I wanted, but I don't.

    So what I did, was make a copy of my page.php, rename it to forum, and put a template code in it. Then I added another few lines to remove the sidebar itself and changed the <div id=content> to <div id=content2>.

    Then I went into the style.css file, found and copied the #content attribute and pasted it as #content2. I then changed the width attribute to fit my wants. Root, your advice helped me out right here, so I thank ya!

    I went back to my forum page, added the new forum.php template, and now I was able to extend my forum across the sidebar area.

    All that I need to do now is to figure out how to remove that "yucky green" background, from my forum page only. I'd like to keep it on every other page.

    I'll start up another post about the background removal, I think we figured this one out as best we could!

Topic Closed

This topic has been closed to new replies.

About this Topic