How to create a blank white page for WordPress?

7 replies
  • |
Hi, I would like to add a completely blank, white page for a WP site. All I want to do is put an image in the center with white space around it, but when I press preview, it still contains the header, footer, widgets, etc.

Do you know how to do this?
#blank #create #page #white #wordpress
  • Profile picture of the author Istvan Horvath
    You need a post or Page template (depending what you are trying to create) that is exactly "completely blank"...

    {{ DiscussionBoard.errors[7498750].message }}
  • Profile picture of the author Patrick
    You can do it by creating a page template...add body class to the header body tag, and then hide elements you don't need for that page..
    {{ DiscussionBoard.errors[7498799].message }}
  • Profile picture of the author Keep Trying
    Hi Istvan, thanks for your response. I know how to create a new page by just leaving the page blank and pressing publish, but it still the header, the footer, widgets, etc. I just want a blank white page. How can I create this type of post or template?
    {{ DiscussionBoard.errors[7498800].message }}
  • Profile picture of the author Istvan Horvath
    Well, don't talk about posts or Pages and templates as if they were equivalent!

    Posts and Pages are "entries" stored in the database.

    Templates are physical files in your theme folder.

    Pages « WordPress Codex

    {{ DiscussionBoard.errors[7498834].message }}
  • Profile picture of the author Istvan Horvath
    Put the code below in an empty file and save it as "empty-page.php"

    Template Name: The Empty Stuff
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <title>Title goes here</title>
      <body class="empty">
      <div class="boo">
         <?php the_content(); ?>
      </div><!--end boo-->   

    Make sure you define in your stylesheet (style.css) the "empty" & "boo" classes. E.g. center the div, give it top margin etc...

    Then make a new Page in WP > select as Page template this one.
    You can give it a title for yourself (but it won't display it) publicly.
    Whatever you will put into the text/content area (image, text etc.) will be shown on the 'front-end' of you Page.

    P.S. If you don't understand what the post above means... you should not attempt to do it

    {{ DiscussionBoard.errors[7499511].message }}
  • Profile picture of the author Keep Trying
    Schwarzes helped me solve this problem. Thanks everyone though for your contribution!
    {{ DiscussionBoard.errors[7499756].message }}

Trending Topics