How to create blog page with no sidebar and no navigation bar??

Discussion in 'Programming' started by Robert A. Kearse, Aug 31, 2011.

  1. #1
    I am trying to create a blog page (just the header logo)
    with no sidebar and no navigation bar.

    I created a page-nosidebar.php file and a test page
    at http://YourBabyGenius.com/test-page-2 but there is
    a green navigation bar I don't know how to get rid of.

    Can anyone identify what I have to eliminate from the
    following code???


    <?php
    /*
    Template Name: Page Template (No Sidebars)
    */
    ?>

    <?php get_header(); ?>

    <div id="contentleft" style="width:100%;">

    <div id="content" style="width:100%;">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class="singlepost">

    <div class="post clearfix maincontent" style="margin-bottom:0;"
    id="post-<?php the_ID(); ?>">

    <div class="entry clearfix">

    <h1><?php the_title(); ?></h1>

    <?php the_content(); ?>

    </div>

    </div>

    </div>

    <?php endwhile; endif; ?>

    </div>

    </div>

    <?php get_footer(); ?>


    *******
    Thanks for your help.

    Robert
     
    Solved! View solution.
    Robert A. Kearse, Aug 31, 2011 IP
  2. #2
    Look in the code for
    <div id="topnav"
    Code (markup):
    From there to
    <div id="page"
    Code (markup):
    you want to delete. (Don't delete the <div id="page" line - the last line you'll delete will be </div>)
     
    Rukbat, Aug 31, 2011 IP
  3. Robert A. Kearse

    Robert A. Kearse Peon

    Messages:
    24
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Rukbat: I followed your directions and they worked perfectly. Many thanks.

    Robert
     
    Robert A. Kearse, Aug 31, 2011 IP
  4. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #4
    There is no '<div id="topnav"' in the above code to delete. So where did he find that code?
     
    mmerlinn, Sep 2, 2011 IP
  5. techntuts

    techntuts Member

    Messages:
    197
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    You are calling the header.php file. Try removing that line of code and it will work.
     
    techntuts, Sep 2, 2011 IP