I built my Dad a site, and while he still emails me the content, I still want the code to be easy to use for me and, in theory, for him one day. The original design was (and is) a static front page with the whole company spiel. Dad rarely changed things since 1999 anyway, so I figured I was pretty safe keeping that layout. I did add in a ‘News’ page, which he could use to ‘blog.’ I keep trying to explain that it’s not being a nerdy blogger, it’s a way to reach out to his readers, but … well, it’s a paradigm shift for him.
Then February happened.
Dad lives in Japan, you see, and among other things, works on Risk Analysis for nuclear power plants. This Fukushima disaster is his bread and butter and in his backyard. Obviously he’s involved. This had a round-about way to making he delve into theming more than I normally do, because my Dad wanted to put something on the front of his page. I thought that it would be a one time thing, but last night he wanted to change it with a new thing. Suddenly Dad needs featured posts!
On one of my sites, I use a special category for featured posts, list five in a sort of news/image scroller that swipes across your screen. It works. What Dad needed was a little different:
- A way to flag a post as ‘featured’ or ‘forward facing’
- Keep his main ‘page’ stuff below
- Show videos (embeds don’t work in the_excerpt)
- Show nothing if you have no featured posts
Thanks to Twitter, I came up with a pretty simple answer. For a brief moment, I toyed with making this a widget, but since I already had a special front page template for the site, instead I added a special loop that runs at the top:
<?php
$sticky = get_option( 'sticky_posts' );
rsort( $sticky );
$sticky = array_slice( $sticky, 0, 1 );
if (is_numeric($sticky[0])) {
/* Query sticky posts */
query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) );
while ( have_posts() ) : the_post();
the_title('<h3>', '</h3>');
if($post->post_excerpt) :
the_excerpt();
else:
the_content();
endif;
endwhile; // End the loop. Whew.
wp_reset_query();
}
?>
From Justin Tadlock we get the very helpful Get the latest sticky posts in WordPress which I used to show the first (and only) sticky. Obviously change the 1 to the number of stickies you want.
<?php $sticky = get_option( 'sticky_posts' ); rsort( $sticky ); $sticky = array_slice( $sticky, 0, 1 ); ?>
Once we’re in the meat of the query, I wanted to show the full post if there’s no custom excerpt, and then just the excerpt if there is one. This works around the annoying fact that you can’t embed videos in the excerpt (images and italics, yes, but not videos). Also, I tossed in if (is_numeric($sticky[0])) {} around the whole thing. If there is no sticky post, then $sticky[0] (which is the first item in the array $sticky) isn’t a number, it’s ‘null’ (which means ‘Hey! Nothing here!). My check is simply ‘If there’s any number in here, we’re good!’
<?php
query_posts( array( 'post__in' => $sticky, 'caller_get_posts' => 1 ) );
while ( have_posts() ) : the_post();
the_title('<h3>', '</h3>');
if($post->post_excerpt) :
the_excerpt();
else:
the_content();
endif;
endwhile; // End the loop. Whew.
?>
At the end I called in wp_reset_query(); so I could reset the query and go back to the regularly scheduled post.
There’s really not a whole lot customized on Woody.com, but what there is works and it’s simple. I try to keep everything such that if Dad every decides he can do this stuff, it will be straightforward so he can do it. Telling him ‘Mark a post as sticky and it’ll show on your home page’ is easy. He can do that.


Except there is. Only the code that relies on the GPL code have to be GPL. Your theme’s CSS and your images actually can be non-GPL (though WordPress won’t host you on their site if you don’t). Also, if you have code that lives on your own server, and people use the plugin to help the app talk to that code, only the code that sits on WordPress or Drupal has to be GPL. Your server’s code? No problem, it can be as proprietary as you want! Akismet, a product made by Automattic (who ‘makes’ WordPress, in a really broad interpretation) works like this. So does Google Analytics (most certainly not owned by WordPress), and there are many plugins to integrate WordPress and Google. This is generally done by APIs (aka Application programing interfaces), and are totally kosher to be as proprietary as you want.
Not much, and this is where people get pissed off. If anyone can buy my software and give it away for free (or pay), why would I even consider releasing something GPL? The question, as Otto puts it, really should be
If you use WordPress, you use it because you have to. I prefer the Apache licenses, myself, but the purpose of using any software freedom license is, at it’s Communist best, a way to make software all around the world better for everyone. You stop people from reinventing the wheel if you show them how to make the axle in the first place! Did you know that Ford and Toyota independently came up with a way to make your brakes charge your hybrid battery? They latter opened up and shared their tech with each other, only to find out how similar they already were! Just imagine how much faster we could have had new technology if they’d collaborated earlier on? With an open-source/free license, my code is there for anyone to say “You know, this would work better…” And they have! And I’ve made my code better thanks to them.
My point remains valid that the technical code for doing these things is not complete, doesn’t work for all situations, and puts a burden on you. And it doesn’t work! If you printed up a newspaper, it’s easy for people to copy your work. We have a copy machine, a scanner, and scissors. If you send out a DVD, we can rip it at home and pass it around to our friends (which is legal actually, so long as you’re not selling it as your own work – see mix tapes, yo). Why is stopping copying bad for your users? If I want to send someone a link to your article, there are two things I want to do. First, I copy your URL. Second I want to copy your title (and maybe an excerpt to illustrate a point). By killing right click, you made it a royal pain to SHARE your work. And if you’re online, you want people to share. The same goes with DVDs, mix tapes etc. Sharing is how we tell people “I really like this!” You’ve shot that down and will lose customers.
As of WordPress 3.1 you can add new columns to admin pages and sort them. You could always add them, but being able to sort the columns is new! This was very much welcome from pretty much everyone who makes extra columns, for whatever reason. As someone who likes them (they make sorting so much easier), I pinged out there to ask how it was done? 


Back in the WordPress MU and the recent WordPress Multisite 3.0.x days, we had something called a ‘Dashboard Blog.’ This was the ‘main’ site of your install, and ostensibly was the default blog to sign users up to and control them from. This was also where you, the admin, had the Super Admin menu. So what were those things for and why were they moved? After all, a lot of people will tell you they worked just fine.