WordPress Insert Media Tip

Posted: May 1st, 2013

So you’ve clicked to add a featured image in the new 3.5+ media upload and the first thing you are presented with is the list of your past uploads.

Screen shot 2013-05-01 at 2.12.05 PM

 

So I have always been clicking the ‘Upload Files’ button and then dragging in my file. I recently discovered you can just drag straight to the Media Library tab. This is fantastic.

drag-to-insert-media

Now if it would only stop freezing on periodic occasions.


WordPress Plugin: Awesome Weather Widget

Posted: April 11th, 2013
Montreal
65F
light intensity shower rain
humidity: 68%
wind: 14mph WSW
H 66 • L 64
65F
Mon
67F
Tue
67F
Wed
70F
Thu

Oklahoma City
72F
light rain
humidity: 82%
wind: 8mph WNW
H 73 • L 71
75F
Mon
76F
Tue
85F
Wed
90F
Thu
Oklahoma City
72F
light rain
humidity: 82%
wind: 8mph WNW
H 73 • L 71
75F
Mon
76F
Tue
85F
Wed
90F
Thu
92F
Fri

I created a weather widget! My development career can safely come to an end. I was tired of all the usual weather widgets out there and set out to build my own. I remember seeing weatherrr.net at some point and really enjoyed the clean look of it, so I based my widget after that design.

Read more »


WordPress Function: Check for H1 Custom Field

Posted: April 8th, 2013

We work with a lot of different themes from WooThemes to Elegant Themes to my own WordPress Themes. One thing we always want to optimize when we build our sites is the H1 tag. Unfortunately a lot of these themes don’t give a specific option to edit H1′s on posts and pages. So we end up putting the H1 as the WordPress title and move along. This is a little sloppy and makes the page lists annoyingly hard to find specific pages (especially for our clients).

Which one of the following pages is the homepage and which is the about page?

Read more »


WordPress: Custom Single Templates by Category

Posted: March 15th, 2013

Back in 2008 there was a blog entry on how to do this. Throughout the comments of the article were about 15 different versions of how to accomplish getting different single.php templates for different categories.  I went through them and combined them into what I feel is the best solution that keeps in tune with other WordPress naming conventions.

First add the function below to your theme functions.php

Read more »


PHP Function: Get Vine App Video Thumbnail

Posted: February 11th, 2013

Here is a handy function that gets the vine app video thumbnail by extracting it from the Facebook Open Graph tag. This should hold you over until they come out with an open API.

function get_vine_thumbnail( $id )
{
	$vine = file_get_contents("http://vine.co/v/{$id}");
	preg_match('/property="og:image" content="(.*?)"/', $vine, $matches);

	return ($matches[1]) ? $matches[1] : false;
}

echo get_vine_thumbnail('bv5ZeQjY352');

You just need to pass in the ID that can be found in the URL: http://vine.co/v/bv5ZeQjY352