=== Static Pages === Tags: Static, Pages, Wrap, Theme Requires at least: 3.2 Tested up to: 3.5 Stable tag: 1.0 Donate link: http://www.blogseye.com/buy-the-book/ Contributors: Keith P. Graham License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Automatically wrap a WordPress Theme around a static HTML page. Add the look and feel of Wordpress to legacy HTML files. == Description == The Static Pages plugin takes any existing html file and wraps it with a WordPress theme. Legacy html files can take advantage of all of the WordPress features such as sidebars, widgets and shortcodes. The plugin works only with HTML type files with the extension of .htm, .html, or .shtml. It extracts the title of the page, the content and any javascript in the header and throws away the rest. It then creates a fake post which it displays in the currently active theme. The legacy web page will appear as a WordPress page using the theme formatting with the theme headers, sidebars and footers. After installing the plugin it is necessary to alter or add an .htaccess file to the area in your site where the static pages reside. The plugin generates the correct .htaccess directives and you can find them on the plugin's settings page. You can add the lines to the WordPress generated .htaccess after the WordPress section. The plugin leaves all of the original file's BODY intact. If the original static page contained headings, menus, sidebars, etc, they will remain and be wrapped in the WordPress theme. Server Side includes (SSI) will, however, be ignored by PHP. The plugin rescues Javascript tags from the head part of the static page and relocates them into the page body. Since the static page is not properly a part of wordpress and is not in the WordPress database, the WordPress comment system will not work correctly with them. It is possible, however to direct all comments made on a static page to another page. You can select an existing WordPress page from the configuration options page. It is a good idea to create a simple page that does nothing but collect comments from the static pages. By default the plugin will use the index.php file in your theme to wrap static pages, but if you have file such as single.php or other custom theme page, you can enter its name on the configuration page. The main drawback of the system is that older pages often have hand crafted headers, sidebars and footers that may even use absolute positioning. The static page may display these on top of your theme, in which case you may want to alter the orginal files. I have been updating my websites since the first version of Netscape Navigator. I created this plugin to wrap a wordpress theme around thousands of pages on my websites. == Installation == 1. Install the Static Pages Plugin either via the WordPress.org plugin directory, or by uploading the files to your server. 2. After activating the Static Pages Plugin, you can change the theme's template page and specify the page that will receive your comments on the plugin's settings page. 3. Copy the .htaccess commands on the plugin's settings page. Paste these into your WordPress .htaccess file, or create a new .htaccess file. Copy this to the server. 4. Test by browsing to a static web page to see if the WordPress theme appears around the page. == Frequently Asked Questions == = Where do I put the .htaccess file? = The .htaccess file belongs in the same directory or in a directory above the one that has the static files. If you have a directory called "salesinfo" with html files in it, you can place the .htaccess file in that directory. You can place a copy in any directory where you have static files. You only have to place it in the topmost directory as it will work on all subdirectories. You can also place it in your document root directory where it will affect every static HTML file on your website. Be careful not to replace any existing .htaccess files. Copy the existing .htaccess files to your local disk, edit them, and paste the new directives to the end of the original .htaccess file. WordPress creates an .htaccess file at your installation root. Be careful not to delete or overlay this. You must edit it and place the new directives at the end of it. = My web pages look crazy in the WordPress theme. = The plugin just slams the old page into the new formatted page. It makes no attempt to correct any of the formatting in the old page. If there are headers, side menus, footers or fancy formatted sections, especially with absolute positioning, the only hope is to edit the static file to make it better behaved. = I get Error 500 everywhere on my website = This is a problem with your .htaccess file. Either delete any new .htaccess files, or restore them to the original state. You may have made a typo when you created the new files or you may have screwed up the original. If there is a problem that can't be fix, then you need to delete the .htaccess file outright. If you lose your permalinks in WordPress, you need to go into WordPress settings and select Permalinks. Change the permalink structure, and save it. Then change it back to where you want it and save it again. This will recreate your WordPress .htaccess file. = I get a 403 trying to access files on a directory = This happens because there is no index file in the directory. Copy the main page in the directory naming it "index.html" and try again. = Notepad won't let me save or create a file as .htaccess = Windows doesn't like files starting with a dot. Try copying an existing .htaccess file from the internet and edit it. You can als edit a file named htaccess without the dot. Copy this up to your website using ftp, and then use your ftp client to rename it. I have done this with both Filezilla and WS_FTP. == Changelog == = 1.0 = * Initial release == Support == This plugin is free and I expect nothing in return. Please rate the plugin at: http://wordpress.org/extend/plugins/ttatic-pages-plugin/ If you wish to support my programming, buy my book: Error Message Eyes: A Programmer's Guide to the Digital Soul Other plugins: Permalink Finder Plugin Open in New Window Plugin Kindle This - publish blog to user's Kindle Stop Spammer Registrations Plugin No Right Click Images Plugin Collapse Page and Category Plugin Custom Post Type List Widget