Is it possible to add a page that is totally blank and doesn't use any components of the site's theme? Or is the best way to do that to upload it separately to the web server outside of WordPress?

  • Yes. Yes. Why do you need to do this? What are you trying to accomplish? – s_ha_dum Nov 30 '15 at 14:29
  • When you say "doesn't use any components of the site's theme", do you mean "does not load WordPress"? Like place a test.php on the root of http://yourdomain and go to http://yourdomain/test.php? No, you can't pull it off. Not with the current technology. Sorry about that. – Andrei Gheorghiu Nov 30 '15 at 14:30
  • 1
    @s_ha_dum: We are trying to add a holiday card to our website, and we don't want our standard header/footer or menu or anything. We just want to start with a blank slate, and our designer will provide the HTML/CSS to use. I figured we could upload his files directly to our web server, but I was hoping I could keep it in WordPress and just change some settings for the page to not use the theme. Thanks! – rryanp Nov 30 '15 at 14:36
  • @rryanp thanks for clarifying your question with that added context – phatskat Nov 30 '15 at 14:45
  • @AndreiGheorghiu "No, you can't pull it off. Not with the current technology." Why not? This is misleading...there's no reason someone couldn't upload a file to their own server and visit it. – phatskat Nov 30 '15 at 14:48

Edit: Updated with the added context from your comment.

You could do this with a custom Page template. In your theme, create a new file. In this example, my theme will be "mytheme2015," my new file is "template-holiday-card.php":

in wp-content/themes/mytheme2015/template-holiday-card.php

* Template Name: Holiday Card

Now, once you have that template file created with a header like that, you can use it in the WordPress admin when you create a new Page type. The commented out "Template Name:" part tells WordPress what to call the template in the backend.

enter image description here

Note: if you don't see the Page Attributes box, look in the Screen Options pulldown menu at the top of the page.

Now, you can put whatever code you want in template-holiday-card.php which (since it's blank) won't display anything by default.

If you want to allow your designer to input the HTML/CSS directly in WordPress through the admin, you could just have a call to the_content() in your template and allow them to edit the page's content in HTML mode. Your resulting template would look something like:

* Template Name: Holiday Card

  • This works and is a good solution if the blank template needs access to WordPress functionality. But if WP functions are not needed in the template, I don't see a point in adding it as a WP page at all. – Andrei Gheorghiu Nov 30 '15 at 14:41
  • 1
    @AndreiGheorghiu you should still have it as part of WP unless you really need the performance of not having WP's overhead. Keeping it in WP means that it won't get lost or forgotten about if it's just sitting out there on it's own. – phatskat Nov 30 '15 at 14:47
  • I completely disagree. If you don't need WP functionality, you do not load WP just for the sake of having it in the same place. The use case you provided (allowing people to dynamically modify the contents of this template) actually means: "I need WP functionality = editing capabilities on the output". But if the template contains some added functionality that doesn't need WP at all, there is no point in running all requests to it through WP. What if it's a chat engine or a payment gateway handler? – Andrei Gheorghiu Nov 30 '15 at 14:55
  • That's what I meant by the need of not having WP's overhead: if it's something as complex as a chat engine or a payment gateway, absolutely do it outside of WP unless you have a good reason to try and integrate the two. If you're doing a simple page, as OP is, there's no real reason not to have it in WP. Either way is fine, but your original comment even says you can't pull that off. – phatskat Nov 30 '15 at 14:58
  • @phatskat: Thank you, thank you, thank you! This is exactly what I needed. I appreciate all your insights. I added "the_content();" to my template file and tried to then add content to the blank page from the WordPress admin, but that didn't show up, but I think I'll be able to tinker with it and figure that out. Thanks again for your time. Thanks to you too, Andrei--we want it in WordPress for the reasons phatskat suggested...it keeps it all together, and we don't have to go to two places to make edits across our site. I do understand your points on doing it outside of WP though. – rryanp Dec 2 '15 at 2:58

After understanding your desired outcome, from the comments, here is my suggestion:

If you want to send a link to your customers with a nice card, you should probably use an image placed on your server (this way you are 100% the fonts are displayed exactly how the designer wants them, on every device) and link it directly. You could also place a stand-alone .html or .php file and link those directly, as well.

If, however, you want your existing content to be ornated for holidays, you should use a function in your functions.php to filter the result of header, menu and/or/maybe footer inside a simple date conditional, replacing the normal ones with the changed ones for the desired period of time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.