Infusionsoft Free Trial   Post. Hire. Done.

Here is a quick video tutorial on how to make a new page template for your Wordpress Website. This is kind of advanced stuff so if this is your first time in making a page template, please practice on a test blog or somthing that is not too valuable. This template code will not work with all Wordpress themes, however I have used it on more than 10.. You might have to change the code a bit to get it to work…

Here is the PHP code that I used to make this page template:

<?php
/*
Template Name: Nosidebar
*/
?>
<?php get_header(); ?>

<div id=”content”>

 <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 
  <div id=”post-<?php the_ID(); ?>”>
   <div>
    <h1><?php the_title(); ?></h1>
   </div>
   <div>
    <?php the_content(‘<p>Read the rest of this page &raquo;</p>’); ?>
    <?php wp_link_pages(array(‘before’ => ‘<p><strong>Pages:</strong> ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
   </div>
  </div>
  
 <?php endwhile; endif; ?>
 
 <div>
  <?php edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’); ?>
 </div>
</div>
<?php get_footer(); ?>

I made this in a notepad and saved it as nosidebar.php

I am addicted to internet marketing and making money online. Who wouldn't want to live that life? I started out with one website as a hobby and now have over 20.
mitz
View all posts by mitz
s website

Related Posts

10 Responses to “Make a Wordpress template page with no sidebar”

  1. [...] http://wordpress-websitebuilder.com/m…; Make a WordPress template page with no sidebar. Create a new page template without a side bar or even a footer. Create different templates for your WordPress Website. [...]

  2. Bill says:

    Thanks, worked great fast and easy, it took longer to watch the video and got it right in one try.

  3. mitz says:

    LOL…yeah I am sorry it took so long…but I try not to leave anything out… Glad it worked for you.

  4. monty says:

    I tried this and all I kept getting was just a blank page with no content.
    Does the work for all themes in wordpress?
    monty´s last blog ..Thinking The Right WayMy ComLuv Profile

  5. mitz says:

    All themes are different, however this code fits into many of them. If it doesn’t work you can try editing the code a bit…Look at the page.php to get an idea of how the code is structured.

  6. omg! i have no clue.. will someone tell me how to get this page saved inside my ipod so i can show my little sister?

  7. mitz says:

    Maybe you could just send her the url of the page. (the address)

  8. mitz says:

    Hey guys…the default Wordpress theme now has this option….so when you are making a post you can choose a template without a sidebar…how great is that. I also notice a lot more themes doing the same thing…Soon this will be the minimum standard or basis included in a bare Wordpress theme.

  9. Jerry says:

    Hi Mitz,

    I don’t see that option in the latest WP install. I’m using Whitehouse as well (just updated earlier this week).

    When I try your page template video I’m getting a return page that’s entirely blank.

    I do see the name nosidebar in the templates selection box.

    I’m using Firefox on the most current WP as well. Site is hosted on my server.

    Thanks!

  10. mitz says:

    Hi Jerry
    have you got the same free theme as me? There may be a pro version. If you do have the same, please try from the start again step by step…Please let me know how you go.

Leave a Reply

CommentLuv Enabled