Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Fixing WordPress
    In reply to: delete the sidebar

    Okay, as far as getting rid of the color in the Kubrick sidebar I just noticed that it’s not done with CSS, but rather a JPG. I spent a lot of time going through the CSS looking for the gray color tags for the sidebar and there were none.

    ‘kubrickbgwide.jpg’ is the image with no gray in the sidebar.

    DOH!

    Forum: Fixing WordPress
    In reply to: delete the sidebar

    I’ve been working on this too with the Kubrick theme. I don’t have this entirely worked out, but here’s a start:

    1) You have to create a template that doesn’t include the ‘get_sidebar();’ function call. ‘get_sidebar()’ populates the page with file links from your site. Leaving out that function from the template will prevernt any of the page links from printing in the sidebar.

    Copy the text below to get the general code for the new wide column template:

    < — copy after this line –>

    <?php
    /*
    Template Name: No Sidebar
    */
    ?>

    <?php get_header(); ?>

    <div id=”content” class=”widecolumn2″>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2><?php the_title(); ?></h2>
    <div class=”widebody2″>
    <?php the_content(‘<p class=”serif”>Read the rest of this page »’); ?>

    <?php link_pages(‘Pages: ‘, ”, ‘number’); ?>

    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this entry.’, ”, ”); ?>
    </div>

    <?php get_footer(); ?>

    <– stop copying before this line –>

    2) Paste the copied text into a new text file and name it something like ‘no-sidebar.php’ This file needs to be uploaded to your ‘themes’ directory inside the folder that contains the theme you’re using (Kubrick). The name of the template that shows up in the admin panel of WordPress comes from the ‘comment’ lines at the top of the template file.

    3) You also need to either use an existing CSS definition, or create a new one to coerce the layout into a single column. Add the following to your main CSS file.

    .widecolumn2 {
    float: left;
    padding: 0 0 20px 45px;
    width: 450px;
    }

    I based this on the ‘widecolumn’ definition. You may have to play with the numbers to get it to align the exact way you like.

    4) Go to the admin panel and choose MANAGE -> PAGES, then EDIT the page you want the new theme to be part of. You’ll see a field that says ‘Page Template’. Choose ‘no-sidebar’ (the one you just created) from the popup list. That forces WordPress to use that template for that particular page.

    When you reload the page now you should see that the sidebar shows no text and there’s a main wide column.

    Incidentally, if anyone knows how to get rid of the fill color for the Kubrick sidebar please post. I haven’t found where to change that yet to make it white.

    – Ken

Viewing 2 replies - 1 through 2 (of 2 total)