Natron commented on this post about the lack of facility to make a ’sticky’ homepage post in Wordpress 2.1. It is a problem that I have come accross when working on themes for 2.1. The Apples theme for Wordpress has a beautiful image of two apples on the homepage, using a hook something like this:
< ?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
However, the is_home hook doesn’t seem to work for a static homepage. Which sucks. Am I missing something, or is this an opportunity to improve everyones favorite blogging platform?
Natron is also going to have to learn to type his URL correctly when leaving comments




February 12th, 2007 at 10:12 pm
touche to you, I do agree on my typing being off today. Between still having a hangover from 2 days ago and smashing my car on the way to work, I am a little out of it today. Onto the business then…
I have successfully used the following code to hack wordpress to allow static data. My use was to place static data in the template. Good for a site intro and diversifying your ad placement on the homepage.
if (is_paged() ==”" ) {
//this area will display only on the homepage
}else{
// this area will display in secondary index pages
}
EXAMPLE
February 12th, 2007 at 10:24 pm
Hope you didn’t spill your drink when you crashed… seriously, drinking on the way to work? lol
February 14th, 2007 at 3:12 am
Why not just use a plugin like this?
Plugin Name: Adhesive
Plugin URI: http://www.asymptomatic.net/wp-hacks
February 14th, 2007 at 4:18 am
Yes, adhesive would be good. Redalt has some really useful tools & good sounding plugins, I can’t seem to download them though:
http://www.redalt.com/downloads/
February 14th, 2007 at 8:14 pm
This would work great for static posts, but what if you want to change the look of the site to have more of a CMS feel.
The thought of the code i gave as example is to place some additional static content on the homepage to change the look and feel. Thus, when a user pages the the previous posts, they have a slightly different experience.
February 15th, 2007 at 1:56 am
More information on the status of the adhesive plugin for those who are interested: http://wordpress.org/support/topic/102613
In my case, I’m looking to use sticky post or page without resorting to theme modification. The site is all about themes & I don’t want to have to hack each one I put up on there.
February 22nd, 2007 at 6:23 am
The is_home function returns true for the ‘blog’ home page but, intentionally and correctly, not the ’static’ front page. I made a plugin that gives you the is_frontpage function which returns true if you’re at the frontpage you set, otherwise it returns false. http://www.bos89.nl/1197/
For background info check this: http://trac.wordpress.org/ticket/3682
June 10th, 2008 at 8:49 pm
omaha poker online spiele…
Questo poker regeln rangfolge ringtones verizon wireless poker en ligne sans argent regeln von poker nouveau bonus casino…
July 6th, 2008 at 1:50 pm
juegos poli poker…
Qui holdem poker descargar no deposit casino poly poker win at video poker black jack online…