I started working on a project site that is going to use WordPress as the CMS engine. I wasn’t sure if this was going to work, but after a little time I found this was pretty easy to do. You start by deleting all the default content and disabling the default plug-ins and management screen options. Once everything is removed/disabled, you start by creating pages (e.g. Home, About, News, etc…) that will display all the content you need on the website. One you have your main page setup (e.g. Home), you need to change the default home page from a dynamic page of blog posts to a static page. You change the default home page under Settings –> Reading –> Front Page Display –> A Static Page –> Choose an option from the Front Page drop down list. That’s it, you now have WordPress running as a basic CMS soltuion.
I wish I could say that’s it, but most likely you’ll need to download and install some additional plug-ins. I found many plug-ins still do not support WordPress 3.0, so you’ll need to be careful! If you happen to install a bad plug-in, there is an easy fix to get you site back online… Delete the plug-in folder (via FTP or Hosting Control Panel) and WordPress will automatically disable the plug-in.
Here is the list of plug-ins I added for my project:
- Contact Form 7
This is a great plug-in, it provides a easy way to create forms that get emailed to you. You create the forms using HTML online and a shortcode style syntax for the input fields. The shortcode inputs are then accessible in your email, that you also create using HTML. - WP Google Maps
This is a very basic Google Maps plug-in, the is about 10 options and the only think extra you need is a GoogleMaps API key. - WordPress.com Stats
I’ve been using this on my blog and love the UI. I wish this was all being done client-side, but for some reason it was created as service. By default it injects a smiley face into your page, so make sure you disable this in your themes style sheet.
The only other thing I added was a SSL plug-in that I created based on 3 other plug-ins. I created my own, so I could force WP to load specific pages as HTTPS and then default back to HTTP if it was not explicitly set to support SSL. I found most of the default plug-ins will leave the user browsing in SSL after they visit a SSL page, I didn’t want this and my plug-ins solves this problem.
<?php
/*
This plug-in is based on WPSSL, forcessl and various other posts/comments I found while searching for a soltuion. The plug-in is used by adding the meta tag "force_ssl" with any value to any pages where you want SSL ("HTTPS") enabled. If the page does NOT have this set and your not looking at an admin page (you can enable SSL for admin/login page in wpconfig.php), then display as HTTP. This prevent links on the SSL page from displaying as SSL for non-secure pages. This plug-in was tested on WordPress 3.0
*/
function wpssl_forcessl()
{
global $post;
$post_id = $post;
if (is_object($post_id))
{
$post_id = $post_id->ID;
}
$force_ssl = get_post_meta($post_id, 'force_ssl');
if(!empty($force_ssl))
{
if(!stristr($_SERVER['REQUEST_URI'], 'wp-admin')) {
if($_SERVER["HTTPS"] != "on") {
$newurl = "https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
header("Location: $newurl");
exit();
}
}
} else {
if(!stristr($_SERVER['REQUEST_URI'], 'wp-admin')) {
if($_SERVER["HTTPS"] == "on") {
$newurl = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
header("Location: $newurl");
exit();
}
} }
}
add_action('wp', 'wpssl_forcessl');
?>
To use the plug-in, you’ll need to add a custom field called “force_ssl” as in the example below.


#1 by cezar on August 3, 2010 - 9:09 am
Quote
Hi Zach,
I tried your plugin. it seems to do the redirect part but for me the link then goes into a 404 error.
Do i need to change anything else?
C
#2 by Zach on August 3, 2010 - 10:18 am
Quote
Cezar,
The only additional thing you need to do is set “force_ssl” in the meta-data to true.
Zach
#3 by cezar on August 23, 2010 - 4:21 am
Quote
did that now it goes into a looping redirect.
“The page isn’t redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete.”
#4 by Zach on August 23, 2010 - 1:45 pm
Quote
Cezar,
I just double checked and everything and the code above is working perfectly on my project site with the code above. I have 1/10 pages with SSL enabled and all the links on the HTTPS page have their URLs rewritten. When I click on one of the links to a non HTTPS page (e.g. Membership to Home), the code redirects me from HTTPS to HTTP without any errors/messages. I have the code working live, I’ll add it onto a clean dev box tonight and let you know if I have a similar error. Are you using WordPress 3.x+ ?
#5 by Deborah on August 24, 2010 - 9:38 am
Quote
I have tried your plugin on 3.0.1 and get no response. It does not break the site however which is a big plus in my book. I have also done the custom field and meta-data to true. Have you tried this on 3.0.1 yet? Is there something I’m missing?
#6 by Deborah on August 24, 2010 - 9:46 am
Quote
This may work however. I just tested my https on a non-wordpress page and it doesn’t work yet. Wait until I get that resolved and retest the installation.