Semi-Static WordPress Homepages: Yogi I’ve Found A Boo Boo

Written by Zain on October 13th, 2007
{ 7 comments }

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…)

Tags: , , , , , , , , , , ,

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Bumpzee
  • Furl
  • Netscape
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati


7 Responses to “Semi-Static WordPress Homepages: Yogi I’ve Found A Boo Boo”

  1. Affiliate Freebies and Marketing Ideas » Blog Archive » Semi-Static WordPress Homepages: Yogi I’ve Found A Boo Boo Says:

    [...] Zain wrote a fantastic post today on “Semi-Static WordPress Homepages: Yogi Iâ [...]

  2. jim1234 (1 comments.) Says:

    Great! My friend have the same problem. So I will tell him about it. This is good “exit” of this situation, thanks.

  3. rushda » Blog Archive » Semi-Static WordPress Homepages: Yogi I’ve Found A Boo Boo Says:

    [...] here to [...]

  4. Scott Says:

    Zain,

    Have you got this working on WP2.3 as yet?

    When I was trying to follow your instructions above the following section seemed to have changed and I have no idea what to do instead:
    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

    Any thoughts?
    Scott.

  5. Texas Liberty Lady (1 comments.) Says:

    My dear Zain,

    Yep, I’m listening! You give me much more credit than I deserve! You spent literally hours with me on this and I am so grateful. I am now on to three more blogs and am getting ready to “snipplet” them. What a great piece of work you did and I am so thankful you took the time to work with me. You are simply the best. Thanks again. Your newbie trainee, Carol

  6. Eric (1 comments.) Says:

    Hi Zain,

    I may be a a newbie and…

    I think I’ve done everything this post and the previous one call for.

    Like Scott, I’m confused about the same steps he mentions.

    In particular, “5. Set “Posts Page” to whichever page you created above.”

    What is meant by “whichever page you created above”?

    I’m using the is_frontpage() plugin.

    For now, I’m on the Kubrik theme.

    I inserted the latest PHP code just after the DIV tag for “narrowcolumn” (Main Index Template)

    I modified that code so is_frontpage() replaces is_home()

    Still, don’t see the Sniplet make it into the page.

    Any ideas are most welcome

  7. karen Says:

    The amount of people that have asked me recently about setting google as their homepage!! Simply go to http://www.igoogle.org.uk and click ’set google as homepage’ - how difficult can it be, duhh??


Leave a Reply