[resolved] Create new page template without sidebar (11 posts)

  1. bck5WG
    Posted 2 years ago #

    I need to create one page that doesn't have the sidebar. My theme is Paramitopia. Can someone please explain how I can do this? Sorry, I know nothing about coding, so if I have to edit anything, please include step by step details. Thanks!

  2. Michael
    Part-Time Forum Moderator
    Posted 2 years ago #

    have you reviewed http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates ?

    - make a copy of page.php and save it as (example) no-sidebar-page.php

    - add this at the very top (example):

    Template Name: No-Sidebar Page Template

    - remove this line:

    <?php get_sidebar(); ?>

    in style.css, add (at the very end):

    .page-template-no-sidebar-page-php #content, .page-template-no-sidebar-page-php .post { width: 960px; }
  3. bck5WG
    Posted 2 years ago #

    Thanks, alchymyth. This may sound like a stupid question, but how do I make a copy of page.php? Do I do that through FTP or can that be done in the site dashboard? If done through FTP, do I save no-side-bar-page.php at the same level as the page.php?

    Thanks, really appreciate it.

  4. Hi bck5WG,

    Yes you'll need FTP to do this.

    Connect to your server and download your entire theme files.
    Make a duplicate of page.php in your theme folder and rename it no-sidebar-page.php
    Then follow alchymyth's instruction.

    Once you have that you insert the template at the same level as page.php

  5. bck5WG
    Posted 2 years ago #

    Hi Christine,

    So if I understand this correctly, in FTP, I download all the theme files onto my computer, then copy page.php and rename the copy no-sidebar-page.php, then upload only no-sidebar-page.php to the same level as page.php. Question is, instead of downloading, the theme files, is it possible to just right click page.php in FTP and make a copy directly? This is probably something I should know, but I hardly ever go in FTP, because it scares me.

  6. i've never done that, but if that works then why not.
    I personally always make edits to my theme files on my computer and then upload them to the server. That way in case anything happens, I can undo and re-upload.

  7. bck5WG
    Posted 2 years ago #

    I'll keep this thread open for a bit. I plan to work on it this weekend. Many, many thanks alchymyth and Christine for your support.

  8. bck5WG
    Posted 2 years ago #

    Holy cow alchymyth! It actually worked. Absolutely genius. Thanks, Christine and alchymyth.

  9. Steve Kimpton
    Posted 2 years ago #

    I'm having trouble doing this in twentytwelve.

    I've added the template with the getsidebar() line removed but when a page is set to have that template, the sidebar stubbornly turns up under the rest of the content.

    I don't understand the need for new for the new style rule either. If there's no sidebar, why does it need to have a width set?

  10. 24webcreation
    Posted 2 years ago #

    I did it and sidebar content disappeared but frame still there

  11. Michael
    Part-Time Forum Moderator
    Posted 2 years ago #


    please start your own topic (possibly in the support section of your used theme) and post more details. http://codex.wordpress.org/Forum_Welcome#Where_To_Post

Topic Closed

This topic has been closed to new replies.

About this Topic