WordPress On the Brain after WordCamp San Francisco

Wow, OK, so this is a random collection of thoughts after #WCSF last weekend.

Never before have I dreamt, thought about or immersed myself in so much WordPress in such a short amount of time.

#WCSF proved to be ample opportunity for networking, learning, eating and traveling. I met a lot of really passionate people out there from bloggers to developers, designers, entrepreneurs, web hosts and many of the people behind the mammoth that WordPress has become. It really was a fun time.

So here’s a shoutout to Adria Richards, Theme.fm, bluehost, Dream Host, the guys over at Media Temple, Matt Mullenweg, Brad Williams, Jeff Kropp, Lou Anne McKeefery, Pete Mall, Brian Tickler, Dan Ross, the guys over at StudioPress, Adam Chew, Linda Sherman and many others.

Probably the best-spent 3 days I’ve had in the 3 years I’ve been developing and designing for WordPress. Until next time!

WordPress 3.3 Could Improve Child Theme Integration

According to a recent WordPress trac ticket, theme authors could soon be rewarded with a little nugget of functionality that would make using child themes much more extensible.

The ticket suggests introducing a function that works similarly to locate_template(), but rather than returning the path of the file (in the parent theme only), it would return a URI to the file, thus allowing a child theme to override the parent’s .js, .css and even image files. The proposed function is called locate_theme_file().

According to the suggested patch posted by johnbillion, this is the current method for loading template files in parent themes only:


wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); 

If locate_theme_file() is introduced, we could instead see functions like these:


wp_enqueue_style( 'dark', locate_theme_file( 'colors/dark.css' ), array(), null ); 

wp_enqueue_style( 'bar', locate_theme_file( 'bar.css' ) );

<img src="<?php echo locate_theme_file( 'icon.png' ); ?>" />

locate_theme_file() would automatically load any of these files via the child theme, BEFORE the parent. Pretty neat huh?

Up to this point, child themes could only override a parent theme’s template files. If theme authors are rewarded with the ability to enqueue many more types of files at the child theme level with this much ease, I anticipate seeing some really exciting new uses for child themes emerging.

How to Make SiteLauncher Work With Firefox 5

Being a Web-worker, I rely on my browser to provide the tools I need to work quickly and efficiently. And since I’m an avid Firefox user, the last couple of months have been fraught with turmoil because I was torn between staying with the trends and updating Firefox (first from 3.6 to 4, then recently from 4 to 5) and waiting for the developers of all of my add-ons to keep up.

I waited and waited and waited to upgrade Firefox to version 5 because I was holding out for the developer of SiteLauncher, to be updated. SiteLauncher is integral to my workflow, because it allows me to open specific webpages using preset keyboard shortcuts.

Turns out, I didn’t need to wait.

Thanks to the folks over at The Heat Web, making SiteLauncher 2.1.0 compatible with Firefox 5 was as easy as changing a value in a file.

There are two ways to do this:

1) The Easy Way

» Download/install this (already modified) file sitelauncher2.1.0.xpi and restart Firefox

2) The Hard-er Way

» Visit the SiteLauncher Download Page, right-click the Add SiteLauncher to Firefox button and click Save As. Save sitelauncher2.1.0.xpi to your hard disk.

» Open the directory where you saved sitelauncher2.1.0.xpi and change the file extension to .zip (sitelauncher2.1.0.zip)

» Important: Open the .zip file in your archival software. DO NOT UNZIP THE DIRECTORY.

» Right click on install.rdf and open it in NotePad (or TextEdit on Mac)

» Locate the maxversion value and change it from 4.2alpre to something above 5. I changed mine to 5.9.9 to make it compatible all the way to Firefox 6.

» Save install.rdf and update the archive

» Back in the directory where you saved the original file, change the file extension back to .xpi from .zip

» All you have to do now, is drag the sitelauncher2.1.0.xpi file over to your Firefox window and it should prompt you to install the add-on.

» That’s it!

Update: Though this hack makes your SiteLauncher keyboard shortcuts work, you’re still unable to modify or add new shortcuts via the backend menus. Thanks Steven!

Add something to post title based on post type

Recently, I was working on a WordPress install employing several custom post types to handle two separate “blogs” within a single site. The site used normal ‘posts’ to handle articles and the client wanted to append the word “BLOG” to the beginning of blog posts’ titles only.

Using the Codex I slapped something together rather easily.

Using the following snippet, I built a simple if statement to test for blog posts, and if not, to render the_title() minus any extra text.

// First test for the post type(s)
<?php global $post
if (get_post_type($post) == 'post_type_1') || get_post_type($post) == 'post_type_2') { ?>
// IF either test registers true, then set the $before parameter in this format: the_title($before, $after);
<h1><a href="<?php the_permalink(); ?>"><?php the_title('BLOG: ', ''); ?></a></h1>
// IF not, then display as normal
<?php } else { ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
// Close the IF statement
<?php } ?>

Using this example, posts that register as true would display like this:

BLOG: The post title

Append ‘Read More’ to the end of the_excerpt()

This snippet, when added to your theme’s functions.php file, will allow you to append ‘… Read More’ or any other text to the end of your excerpts. Creates a more streamlined look.

<br />
function excerpt_readmore($more) {<br />
	return '... &lt;a href=&quot;'. get_permalink($post-&gt;ID) . '&quot; class=&quot;readmore&quot;&gt;' . 'Read More' . '&lt;/a&gt;';<br />
}<br />
add_filter('excerpt_more', 'excerpt_readmore');<br />

Source: WPSnipp.com

Oh the places you’ll go … on the Internet

Photo by Flickr/James Cridland. Used with permission under Creative Commons License.

Sometimes I just reflect on what access and ease the Internet has brought to people’s everyday lives.

Tonight alone, I ordered books on Amazon, opted-out of pre-screened credit card offers for 5 years, window shopped for Mother’s Day and applied for a Tax ID number. All from the comfort of my computer chair.

I’ve heard the argument that the Internet has made my generation lazy (see: Generation Y), but I think it actually makes us more productive. If you think about it, we’re able to accomplish quite a bit more with a few taps on the keyboard or clicks on a mouse than was ever possible in the past. Heck, now people are walking, driving, biking, running, exercising even camping while they’re hooked into the Internet. That screams of productivity (not to mention lunacy).

There’s never been a doubt that the Internet affords us with many new and ever-changing luxuries. But I sometimes think it’s fun to marvel at what life might’ve been like 50 years earlier. Would have it been slower? More productive? Would we have had more face-to-face interaction and less static clutter?

What do you think? Let me know in the comments.

A frustrating journey to Joomla and back

Photo by Flickr/gagilas. Used with permission under Creative Commons License.

I was recently named to the Denver Press Club Board of Directors and one of the duties I volunteered for was to take over website updates for the club.

Turns out they use Joomla, and while I dabbled with it some in the days before 1.0, I’d never really found it that intuitive. Unfortunately, not much has changed.

My first instinct upon login was to figure out how the structure worked. I guess it is only natural that with CMS systems like these that there’s and inherent lingo that goes along with them. With WordPress, I’m used to lingo like widgets, posts and pages. In Joomla, I’m dealing with articles (posts), components (?), modules (widgets?) and plugins.

At this point, I don’t have a lot of time to dive into the documentation to figure out what’s what, but I figured it can’t be that hard to figure out how this works, right? Boy was I wrong.

As far as I can tell, there’s almost no intuitive interfaces in this whole mess of menus and action buttons. I would kill to be able to juggle around modules and article blocks in a drag and drop interface. Or even have an opportunity to make sense of the source code. But it seems I’m relegated to reordering elements manually and attempting to decipher this smorgasbord of menus and submenus.

I thought the WordPress Media Library needed work, but Joomla Media Manager takes the cake. There’s no capability to select a group of images (or any other media) all at once. You CAN upload many at a time, but you have to add them to the queue one at a time. What a bore. Isn’t this supposed to be fun?

I could keep writing all day about the frustrations I had using Joomla but I won’t. I’ll just offer some advice to those folks, take a look at what Drupal and WordPress have been doing and take a lot of notes. Because your CMS needs a lot of work.