Support » Fixing WordPress » Adding a blank page within a theme

  • I’m trying to add a Mingle plugin forum to my blog, which uses the free Oregon theme. How can I make the page for the forum free of the header’s sidebars and header so that the forum will have plenty of space?

    As it is now, the forum fits within it all, as if it were a blog post, and it’s just not enough space.

    Thanks!

    http://www.mypatraining.com

Viewing 15 replies - 1 through 15 (of 20 total)
  • I’ve not used that particular plugin, but generally speaking, if you’ve created a page to display the forum, you would just need a special template for it. So basically, you can copy and paste the code for the page template you are using now into a new php file. Check this out to see how to put the info the template file needs at the top of the page (you need to give the template a name inside the file. http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates. Call the actual file template-forum.php or something like that. Then go through, and remove <?php get_header(); ?>, <?php get_sidebar(); ?>, and any other alt sidebar code that looks like that. Next, go into the page editor, and change that pages template to the new one you created.

    Using the MagZine theme Site Addy: http://www.dowknowhow.com/?page_id=1073
    I want to make a template with no right hand sidebar for the Forum page. I’d like the Mingle forum to utilize the entire page width.
    Ive created a page template called: full-page.php
    I’ve included the “Template Name” code on the new page
    I’ve included a ‘page-template-full-page-php #content’ request in the style.css

    I am able to remove the right sidebar content but the forum does not widen to full page width but rather remains the same size it currently is. I can put the example up for you if you wish to see it.

    Hi Rob, in your page template, you should have <div id="content"> or something similar. You should add the style parameter to it, to make it wider. Like this <div id="content" style="width: 980px;">

    Let me know if that does or doesn’t help. Be more than glad to help you out more. 🙂

    your theme does not use the body_class() which would crate the css class .page-template-full-page-php on which you were relying to stretch the #content

    edit header.php,
    find
    <body>
    and change it to
    <body <?php body_class(); ?>>

    (in rare cases there might be a conflict of existing css classes with the ones automatically created)

    Okay in the header.php it currently displays the following:
    ‘<body <?php if( is_home()) : ?> class=”home” <?php endif; ?>>’

    Your saying to eliminate/replace that whole string with:
    ‘<body <?php body_class(); ?>>’

    (yes Dallasmoore I tried parameter adjust to no avial)

    Your saying to eliminate/replace that whole string with:
    ‘<body <?php body_class(); ?>>’

    yes, i think that should work, as the body_class outputs the class .home as well.

    Okay I have it up, you can look at the results… I tried a couple different adds in the style.css template… brain is rupturing not sure if I got it right. But you can see that the right hand column is still present, back ground is tweaked,(no biggie, it can stay or go) but the actual forum is still only 3/4 width

    So here is the full-page.php code

    <?php
    /*
    Template Name: Full Page
    */
    ?>
    <?php get_header(); ?>
    
            	<div class="single-main"> <!--Single-Main-->
            		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                	<h2><?php the_title(); ?></h2>
                    <div class="author"><em>Hi</em>: <strong><?php the_author() ?></strong></div>
                    <hr />
    
                    <?php the_content(); ?>
    
                    <?php endwhile; else: ?>
    				<p>Sorry, no posts matched your criteria.</p>
    				<?php endif; ?>
    
                </div><!--Single-Main-->
                <div id="content" class="wide">

    And here is the style.css add:

    .page-template-
    ...
    width: 550px; /
    ...
    }
    #content.wide {
    }
    #comment {
    background-imag
    width: 100%;
    }

    Hope they don’t kick my butt for posting that

    And Dallasmoore I also tweaked the full-page-php content back to your suggestion just now too… still displays the same. Its being a real booger

    Well, part of my problem is that I was referring to the original’s poster’s website. That could be why ;). But your content division is fine, you just need to change the .single-main to <div class=”single-main” style=”width:640px;”>

    this style might work:

    .page-template-full-page-php #content .single-main {
    width: 940px!important; }

    (only checked in firefox; the !important seems to be needed to set the width.)

    Where does that go exactly?

    And yes, 940 is what I meant as well. XD Silly fingers.

    So I end up with something like this correct?

    .page-template-full-page-php #content .single-main {
    width: 940px!important; }
    #content.wide { width: 800px; }
    }
    #comment {
    background-image: none;
    width: 900px;
    }
Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Adding a blank page within a theme’ is closed to new replies.