The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Alternate Page Template - no header and no sidebar (7 posts)

  1. pmars
    Posted 6 years ago #

    Using WP 2.9.2, Motion 1.0.4 theme:

    Trying to create an alternate page template with no header and no side-bar.

    I have tried all kinds of variations of pages, functions.php, etc..

    Can't get any alternates to actually function.

    Basically I want to have a couple pages with no header and side bar, since the same header is just not appropriate on all pages of the site

    Thanks for any help :-)

  2. Michael
    Forum Moderator
    Posted 6 years ago #

    general outlay:


    Template Name: Headerless
    get_header('less'); ?>
    <div id="main">
    <div id="content">
    <!--- change this to do what the template is supposed to do -->
    </div><!-- /content -->
    <?php // don't get_sidebar(); ?>
    </div><!-- /main -->
    <?php get_footer(); ?>

    (this keeps the category nav; remove if needed)
    (included a line with <link href="<?php bloginfo('stylesheet_directory'); ?>/no_sidebar.css" rel="stylesheet" type="text/css" media="screen" /> )


    /* style for headless template without sidebar */
    #content {float:left; width:980px;}

    (add more styles if needed)

    related documentation of the codex:



  3. worthwhileluxury
    Posted 6 years ago #

    Hello. Sorry for barging in. I also need some pages to display without the side bars but with the header.
    You have code up here but I have no idea where to put it and how to make it apply. Please can you help me?

  4. Michael
    Forum Moderator
    Posted 6 years ago #

    it would be better if you could start a new thread.

    the 'code' above is only an outline of some action, and no 'copy/paste' template.

    study the above linked docs of the codex. and search the forum, your idea is not unique, and someone might have answered it already.

  5. worthwhileluxury
    Posted 6 years ago #

    ok thanks. I have looked but can't find anything helpful. Will look again.

  6. pmars
    Posted 6 years ago #

    Thanks for the input alchymyth. Got it working.

  7. idowning
    Posted 5 years ago #

    Pointed me in the right direction. I'm using the custom header on pages that I am using an iframe link to with fancybox. I'll put a link up once the site goes live if you like.

Topic Closed

This topic has been closed to new replies.

About this Topic