Title: EzStatic Plugin
Last modified: February 5, 2017

---

# EzStatic Plugin

 *  [ringmaster](https://wordpress.org/support/users/ringmaster/)
 * (@ringmaster)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/)
 * I know there are a bunch of static-making plugins out there, but I thought I 
   would toss this out as an easy (if inefficient) way to implement static pages.
   
   [Get a copy of EzStatic.php](http://www.asymptomatic.net/wp-hacks) and put it
   in your plugins directory. Activate it. Put a file in your web root (same directory
   as index.php). It can be html or php. Take the base name of the file (for “test.
   php” use “test”) and incorporate it into a URL like so: `http://www.example.com/
   index.php?static=test` The plugin will find your file, execute it, and embed 
   it into your WP template. If your file was a php file, you can even use WP functions
   inside it. No messy file editing or deleting, just activate the plugin. Another
   proof of concept plugin from yours truly. Enjoy!

Viewing 15 replies - 1 through 15 (of 160 total)

1 [2](https://wordpress.org/support/topic/ezstatic-plugin/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/ezstatic-plugin/page/3/?output_format=md)…
[9](https://wordpress.org/support/topic/ezstatic-plugin/page/9/?output_format=md)
[10](https://wordpress.org/support/topic/ezstatic-plugin/page/10/?output_format=md)
[11](https://wordpress.org/support/topic/ezstatic-plugin/page/11/?output_format=md)
[→](https://wordpress.org/support/topic/ezstatic-plugin/page/2/?output_format=md)

 *  [Xyth](https://wordpress.org/support/users/xyth/)
 * (@xyth)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72869)
 * Aww, man! Now I have to unkludge my handmade static pages.
    Seriously, worked
   great at 1.0 on a few pages, will test a few more. btw, it is not idiot proof
   yet, it didn’t work at first, until I noticed that .html wasn’t an option in 
   the search path. idiot —> Xyth
 *  [usafdcc](https://wordpress.org/support/users/usafdcc/)
 * (@usafdcc)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72872)
 * I take it that it is suppose to put the static page into the contents section.
   If that is the case it did not work for me. I installed it, and then activated
   it. I created an htm document. When I directed it to display the document I created
   the text was not situated in the content area but all over the page. I also tryed
   it with a php file.
 *  [Xyth](https://wordpress.org/support/users/xyth/)
 * (@xyth)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72874)
 * Ringmaster, I think your missing a division tag set: I manually added <div id
   =”content”> at the top of my code and </div> at the end and all formating was
   fixed.
 *  [debwire](https://wordpress.org/support/users/debwire/)
 * (@debwire)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72889)
 * Which file did you put that in: the .html file or the existing index.php file?
   It already exists in my existing index.php file.
 *  [debwire](https://wordpress.org/support/users/debwire/)
 * (@debwire)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72890)
 * Thanks for clarifying Xyth!
 *  [Xyth](https://wordpress.org/support/users/xyth/)
 * (@xyth)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72891)
 * The .html file. The index.php remains unmodified. I created a .php file with 
   no header or footer info, just tables and text. Also did a .htm file. .HTML is
   not a valid extension in this version, as it was not included in the search path,
   although it can be added.
 *  [debwire](https://wordpress.org/support/users/debwire/)
 * (@debwire)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72892)
 * I got it to work. I love this!
 *  [Xyth](https://wordpress.org/support/users/xyth/)
 * (@xyth)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72903)
 * I finally got around to validating XHTML 1.0 and noticed I had an extra closing
   tag </div> that wasn’t needed. Looks like only the opening tag is missing. Sorry
   for the error.
    I suspect Ringmaster will edit the code to eliminate even the
   opening tag, but until 1.1, the work around seems valid.
 *  Thread Starter [ringmaster](https://wordpress.org/support/users/ringmaster/)
 * (@ringmaster)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72974)
 * Yeah, it was a quickie job, to be sure. About 40 minutes of coding and a rush
   to get it on-site before I left for a dinner engagement.
    If it’s _not_ working,
   I should mention that you need to have something close to the default index.php
   page. You need to have a div defined as `<div id="content">` that contains your
   post content (duh) followed immediately by a div defined as `<div id="menu">`.
   The plugin basically cuts all of that out and replaces it with your static stuff.
   It should replace the content div, and if it’s not, I’ll need to fix that in 
   1.1. Everything the plugin writes _should_ validate in the end – that is my goal.
   You can pretty easily add support for .html as an extension, and I’ll include
   that in 1.1 too.
 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72982)
 * What 1.0 seemed to do was take the index.php and cut out everything from and 
   including the the <div id”content”> to the <div id=”menu”> tag, putting back 
   in the new content and the closing tags, but omitted adding back in the <div 
   id”content”> tag.
    A great future enhacement would be the ability to add content
   between the head tags in addition to the content section. Some pages could use
   this, like adding temporary CSS info for that page only, or javascript. Great
   job.
 *  [Xyth](https://wordpress.org/support/users/xyth/)
 * (@xyth)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72983)
 * Bah, the post above is mine, forgot to log in.
 *  Thread Starter [ringmaster](https://wordpress.org/support/users/ringmaster/)
 * (@ringmaster)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72985)
 * What tags do you suggest that it capture from the source file for inclusion?
   
   Anything redundant (already appearing in the WP index.php) might have to be omitted–
   such as the Title tag. I could probably coerce the title into the page using 
   Javascript, but I don’t think I can remove the old title tag for technical reasons,
   and adding a second one would cause the page not to validate. I’ll give it some
   thought before releasing the fixes in 1.1.
 *  Thread Starter [ringmaster](https://wordpress.org/support/users/ringmaster/)
 * (@ringmaster)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72991)
 * Ok, [1.1 is online](http://www.asymptomatic.net/wp-hacks).
    I fixed the div issue.
   You don’t need to re-add this div to your own code. I added the ability to transplant
   the head from the static page to the WordPress output. It removes the <title>
   tag and uses Javascript to change the existing title based on the title in the
   static file. I added .html and .txt as static target files. If you didn’t delete
   your license.txt from your WordPress install, you should be able to read it inside
   your WP template using: [http://www.yourdomain.com/index.php?static=license](http://www.yourdomain.com/index.php?static=license)
 *  [chrisada](https://wordpress.org/support/users/chrisada/)
 * (@chrisada)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72992)
 * same as Xyth
 *  Thread Starter [ringmaster](https://wordpress.org/support/users/ringmaster/)
 * (@ringmaster)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/ezstatic-plugin/#post-72996)
 * Oops. I zipped my test server code instead of the release server code.
    Try [1.1a](http://www.asymptomatic.net/wp-hacks)
   for a copy with my debugging stuff removed. To use a title on the static page,
   you have to put the title in a head tag. You know, make a working HTML page with
   a title. EzStatic will take everything inside the head tag and put it in the 
   head tag of your WP page. Here’s an example of how it was designed to work, with
   links to the PHP source of the embedded page and XHTML checkers that show it’s
   valid: [http://www.asymptomatic.net/index.php?static=spin](http://www.asymptomatic.net/index.php?static=spin)
   Of course, if you reference a file that doesn’t have a <head> section then the
   head is not included. If you reference a file that does not have a <body> section,
   then it simply embeds the entire file. If you stick a <title> tag somewhere in
   a random text file, it does nothing – the <title> has to be in a <head> tag. 
   Sorry I didn’t make this clear before.

Viewing 15 replies - 1 through 15 (of 160 total)

1 [2](https://wordpress.org/support/topic/ezstatic-plugin/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/ezstatic-plugin/page/3/?output_format=md)…
[9](https://wordpress.org/support/topic/ezstatic-plugin/page/9/?output_format=md)
[10](https://wordpress.org/support/topic/ezstatic-plugin/page/10/?output_format=md)
[11](https://wordpress.org/support/topic/ezstatic-plugin/page/11/?output_format=md)
[→](https://wordpress.org/support/topic/ezstatic-plugin/page/2/?output_format=md)

The topic ‘EzStatic Plugin’ is closed to new replies.

 * 160 replies
 * 32 participants
 * Last reply from: [exilefromgroggs](https://wordpress.org/support/users/exilefromgroggs/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/ezstatic-plugin/page/11/#post-73428)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
