Okay. I’ll admit it… I completely messed up. Regular readers may know that I recently wrote this pretty excellent guide on how to set up the Semi-Static WordPress homepage but no-one noticed the *huge* error that I had in the instruction.

No-one noticed *except* from a really amazing Texan Liberty Lady (Carol) who describes herself as *green, green, green* when it comes to WordPress and yet still attempted to take on the Semi-Static homepage. Now that’s really ballsy if you ask me – it’s quite an advanced technique.

Anyway, she emailed me and let me know that she’d followed the instructions and it wasn’t working.

That’s right people. I had a boo boo on my semi (I’ll let you imagination run with that one).

So she kindly let me have access to her site and I had a look around. And you know what? Completely my fault – my “how-to” guide was more of a “how-not-to” guide. DOH! A Homer moment – that’s what happens when you post just before bedtime… (never again!)

Well, guess what? Now that sent her new instructions, she’s successfully implemented it on her Ron Paul website (I was like “Ron Paul Who?“, as I don’t read newspapers and haven’t done for several years now and shy away from any type of political discussion as I find it really messes with my inner wellbeing, man…).

Also – credit where credit’s due – Carol also sent me a tip on updating the code I sent her. Yes, she even spent the time looking up the WordPress Codex to find out more about how to do this. Now, if someone this green spends this much time making sure her website is high quality when it comes to WordPress, then some of you other political bloggers should probably watch out – she’s determined and will probably be spending a lot more time promoting her candidate of choice!

Me… I’m staying out of the fray. I’m all for Democracy and freedom of speech, yada, yada, blah, blah, blah… but the last time Bush got in, so that’s that say about the so-called Democratic system. More of this to come – I’m currently re-writing a blog post that doesn’t make me sound an ideological fascist (cause I’m not! I’m politically apathetic with a tendancy to dislike the masses for their inability to differentiate between what sucks and what doesn’t).

I digress. As usual. Because it’s my blog and I’m tangential…

So… anyone up for a 3rd draft of the Semi for WordPress? Here’s proper instructions this time.

Okay, you’ll need to refer to the first set of instruction that I wrote on the Semi-Static Homepage – apologies in advance if you have to flick back and forth but I’m busy writing an eBook. All of this stuff will be in there (and not on separate pages) so you can read it properly, at your own pace and as leisurely as you like once I get it all together.

For the moment, follow the instructions on the other page and…

Setting Up The Home Page

  1. Create a new page with a Page Title called “Home” (or whatever you want to call it).
  2. Optional: if you have different templates set up, you can use these if you like (using the dropdown on the right hand side) but make a note of the template used as this is the template where the Sniplets code will need to be pasted in to.
  3. Publish the page.

This page doesn’t need to have any content on it – for some reason, the content doesn’t get rendered to the screen using this method and WordPress seems to ignore it completely! However, WordPress will display the Sniplet code as well as your “recent blog posts”. I have a feeling that “the loop” (used for generating the content on WP pages) goes through and does the recent posts bit, it then ignores the “content” portion that you write inside your page. This doesn’t really matter because once you get Sniplets working, you can add and edit “static” content (or stuff you would have put in your page) when you like!

Now here’s the other crucial bit that I forgot to mention:

Setting Up The Semi-Static Page

  1. Click on Options
  2. Click on Reading
  3. Set “Front Page Displays” to “A static page”
  4. Important: *Leave* “Front Page” well alone and set it to “- Select -” if it already isn’t.
  5. Set “Posts Page” to whichever page you created above.
  6. Hit the “Update Options” button

Notes: No idea why setting the “Front Page” doesn’t work. Like I mention in my previous post, the whole “Static” Page thing isn’t very well documented and it took me ages to work out this solution!

Something else to note. If you recently downloaded the latest version of Sniplets, then I know that John updated it and it works a little differently to when I first wrote the article. Mainly in that you now have to “echo” the Sniplet in a template. Echo’ing is simply PHP telling the page to write the content out. Looking at my article, it says to use:

<?php
if(is_home() && function_exists('the_sniplet')){
the_sniplet('homepage');
}
?>

This is incorrect. The right way of doing it now (and I think John’s also updated his guide on how this is used) is to do this where you need to “echo” the function to render the sniplet:

<?php
if(is_home() && function_exists('the_sniplet')){
echo the_sniplet('homepage');
}
?>

Note the “echo” at the beginning. This is very important otherwise nothing shows up. You have been warned.

Now here’s the bit that Carol kindly sent over. This was an oversight on my part and I’m very grateful that she sent it. It’s a slight modification to the code to ensure that it works in WordPress 2.1+. Here’s a section out of the WordPress Codex that explains things a bit more:

Please note that in 2.1, the conditional is_home() (http://codex.wordpress.org/Conditional_Tags#The_Main_Page) function no longer returns true for the Front Page set in Admin. In order to emulate the pre-2.1 function of returning true for the “front” home page, use the is_frontpage plugin (http://www.bos89.nl/1197) or use is_page(home)http://codex.wordpress.org/Conditional_Tags#A_PAGE_Page) where the slug of your desired front page is “home”.
http://codex.wordpress.org/Pages

I’m just glad no-one takes this stuff seriously enough to try out (or are too apathetic to give something new a go). Perhaps I’m being unfair – I guess you guys are all majorly overworked, knuckling down and building things. I know most Internet Marketers work 14 hour days without stopping for food, drink or ever seeing the daylight. Because we like it that way… only in our dreams – where riches are plentiful and the beaches are sandy and the water is crystal clear – do we ever imagine that we’re taking a break…

Although saying that, I’ve got a laptop with a wifi connection in my version…

Thanks to Carol for spotting the mistake(s).

And no thanks to you guys for not! :P

Sometimes I wonder if I’m just writing this for me. I guess not. At least Carol’s listening.

Bless you, my love. You go, girl and make your Ron Paul site ROCK!

(I still have no idea who he is… I may need to grab a newspaper or something… with any luck he’s not like Bush! Don’t get me started…)