Philadelphia Gets A WordPress Meetup Group!

WordPress LogoPhiladelphia now has a Meetup group dedicated to WordPress! I wanted to organize this new Meetup group to help WordPress addicts, like myself, find each other in the City of Brotherly Love. One of the great aspects of WordPress is the community that surrounds it and Meetups are the local lifeline of that community.

The inaugural event will take place on August 11th at 7pm at Future Media Concepts (FMC) in downtown Philly. WebDevStudios.com is sponsoring the event and donating pizzas for all!

I’m really excited to find some local talent to come speak at our monthly gatherings. If you’re in the Philly area, and interested in WordPress. make sure you join the Meetup group and get involved!

Tags: , ,

Free WordPress Security Webinar Today!

Today I’m giving a free WordPress Security Webinar with Cory Miller and the WebDesign.com team. The live screencast starts at 12pm EDT (11am CDT).

I plan on demoing a hacked website to show what hacks are capable of. I will also be covering top security tips and plugins for your websites and blogs. And lastly we’ll talk about how to clean up your website after a hack occurs. I will also be giving away some copies of Professional WordPress!

If you run a WordPress powered website these tips are not to be missed!

Tags: , ,

Fresh New Look for Summer

StrangeWork.com is sporting a fresh new look! I haven’t switched the theme on this site since I launched it in 2006, so it was long overdue. I decided to go with a very clean minimal style using the Genesis theme framework. In fact I’m running the default child theme for Genesis. I plan on tweaking the design to give it my own personal touch, but for now I’m really enjoying the clean look. We use Genesis for a lot of WordPress projects at WebDevStudios and I’ve really come to enjoy working with it. It’s a pretty solid framework so if you haven’t tried it out I highly recommend it.

I’m also starting up a new WordPress Tips and Tricks Newsletter so if you are interested be sure to sign up!

Tags: , ,

How To: Save Taxonomy Meta Data as an Options Array in WordPress

One challenge in WordPress is saving meta data on a taxonomy. For instance imagine you want to save additional data on a category or tag. Currently there is no wp_termmeta database table to store taxonomy meta data. In this tutorial I’m going to show you how to save a single ID against every category in WordPress. I’m going to save that meta data (the ID in this case) as a single array of options in the WordPress options table.

First we need to add a form field to the Edit Category screen. To do this we’ll use the edit_category_form_fields action hook available in WordPress:

<?php
add_action ( 'edit_category_form_fields', 'tme_cat_featured');

function tme_cat_featured( $tag ) {

	//check for existing featured ID
	$cat_featured = get_option( 'category_featured' );
	$featured_id = '';
	if ( is_array( $cat_featured ) && array_key_exists( $tag->term_id, $cat_featured ) ) {
		$featured_id = $cat_featured[$tag->term_id] ;
	}
?>
    <tr class="form-field">
        <th scope="row" valign="top"><label for="category_featured"><?php _e('Featured Post ID') ?></label></th>
        <td>
        	<input type="text" name="category_featured" id="category_featured" size="3" style="width:5%;" value="<?php echo $featured_id; ?>"><br />
            <span class="description">The post ID that will be the featured post when viewing this category.</span>
        </td>
    </tr>

<?php
}
?>

The above code will add a single text field (Featured Post ID) to the Edit Category screen as shown in the screenshot below:

Now that we’ve added a text field to our Edit Category page we need to save the input to our option array. To capture the ID when a category is updated we’ll use the edited_category action hook like so:

<?php
add_action ( 'edited_category', 'tme_save_featured');

function tme_save_featured( $term_id ) {
	if ( isset( $_POST['category_featured'] ) ) {

		//load existing category featured option
		$current_featured = get_option( 'category_featured' );

		//set featured post ID to proper category ID in options array
		$current_featured[$term_id] = intval( $_POST['category_featured'] );

		//save the option array
		update_option( 'category_featured', $current_featured );
	}
}
?>

As you can see we are saving the Category ID and Featured Post ID as a single associative array option value in WordPress named category_featured. As you add Featured Post ID values to each of your categories they will be added to this array and saved in WordPress. One thing to consider when using this method is scalability. If you plan on storing thousands of meta data values for your taxonomies this isn’t the method for you.

I packaged this example into a stand alone plugin so you can easily install on your WordPress website and test it out: Download the Taxonomy Meta Data plugin example.

Tags: , , ,

StrangeWork.com is Running WordPress 3.0!

WordPress 3.0 (nicknamed Thelonious) was released earlier today and StrangeWork.com is now running it! Actually I’ve been running WordPress 3.0 on various websites for the past 1.5 months, but this is the official release!

Be sure to check out the newest features in WP 3.0 including the enhanced custom post type support. You can use my Custom Post Type UI plugin for a quick and easy way to play with post types.

I loved seeing three WDS guys on the list of Contributors: Chris Cochran, Brian Messenlehner, and Me!

Also check out the video showing the new features in 3.0:

Tags: , ,

The Big 30 – Happy Birthday to Me!

Yesterday was my 30th birthday and amazingly it wasn’t as bad as I expected. Sure I’m an old man now, but I certainly don’t feel like it. I guess turning 30 is just a state of mind. As they say you’re only as old as you feel right?

I spent part of the day waiting for FiOS to be installed in the new house. After the install was complete we had my birthday dinner at Hooters, which is pretty much a tradition at this point. All in all it was a good birthday!

I found this quote online that seems appropriate:

Everything I know I learned after I was thirty. – Georges Clemenceau

WordCamp San Francisco 2010 Recap

WordCamp San Francisco has come and gone and here I am a month later writing a recap about it. I had an awesome time in San Francisco, not only for WordCamp, but also hanging out in California for a week!

WordCamp Day 1 was held at the Mission Bay Conference Center in San Francisco. The location was really nice and had plenty of room for all 700+ attendees at the event. I attended a few sessions throughout the day, but spent most of my time (as I usually do) chatting with fellow WordPress junkies in the hallways and outside.

For lunch we had an amazing BBQ buffet and some live jazz to enjoy while we ate outside. At the end of the day Matt Mullenweg gave his annual State of the Word address. However the best part was yet to come, and that was the afterparty!

The WordCamp after party was held at the Automattic lounge on Pier 38. After passing through security (yes security) we were treated to an open bar and a nice assortment of snacks including fresh made crepes! I knew we were in trouble when the drinks were being made at about a 90% alcohol and 10% mixer ratio.

I would share all of the photos from that night, but it would look more like the credits from The Hangover, so instead I picked my favorites of the bunch to share:

Photo credits to Chris Cochran

Tags: , ,

WordCamp San Francisco This Weekend!

In case you live in a hole and haven’t heard WordCamp San Francisco is this weekend! I’ll be attending the event with the WDS crew as usual!
WordCamp SF Logo
It’s been about 3 months since my last WordCamp so I’m extremely excited for this event! It will be great seeing all of my WordPress friends and also making new friends. WordCamps are really all about the networking so if this is your first WordCamp be sure to hit the after parties and socialize!

This is also the first WordCamp since the release of Professional WordPress! I plan on bringing some copies of my new book to giveaway! If you are interested in getting a free copy make sure to track me down at the event to find out how you can do so. I will also have plenty of WDS schwag to hand out. I’ll be sure to write a recap of the event when I return next week.

If for some reason I don’t return next week it means I have decided to stay in California permanently. :)

Tags: ,

How To: Create Facebook Like Username URLs in WordPress

One of the great things about working with WordPress on a daily basis is I get to figure out how to do all sorts of fun things in WordPress! The latest challenge was figuring out how to setup Facebook like username URLs in WordPress. For example I wanted http://example.com/username to load the Author’s profile page. This was surprisingly much easier to accomplish than I assumed it would be. To do this visit Settings > Permalinks in the admin dashboard of WordPress and set your permalink custom structure to:

/%author%/%postname%/

That’s all there is to it! Now the user URL will be http://example.com/username just like in Facebook! To create a custom author page design simply edit (or create if it doesn’t exist) the author.php template file in your theme directory. Below is a screenshot of the custom permalink structure:

Facebook User URLs in WordPress

Tags: , , ,

SitePoint Podcast Interview for Professional WordPress

Last week Hal Stern, David Damstra, and myself had the privilege of being interviewed on the SitePoint Podcast for our new book Professional WordPress!SitePoint Logo

I had a great time discussing our book with hosts Patrick O’Keefe and Stephan Segraves. We covered many different topics including how the book came to be, what separates our book from the rest, and how our book is a solid compliment to the Codex. We also had a great discussion about the difference between a WordPress Theme and a Theme Framework, which I think a lot of people are still a little confused by.

Professional WordPress Book CoverIt’s a little strange being on the other side of the interview table, but I’m starting to get use to it. Promoting a book is a lot of work, but in the end the payoff is well worth it. If you haven’t had a chance to order this book what are you waiting for? Order a copy today and support your favorite WordPress developers!

Also be sure to subscribe to the SitePoint Podcast, which I’m a regular co-host on, if you haven’t already! We discuss the latest news and happenings in the world of web development and design.

Tags: , ,