Posts Tagged ‘Technology’

Three things to add to every Wordpress theme function file

// February 23rd, 2010 // No Comments » // tagged: > >

I develop a lot of wordpress sites and always try to customize the site with as few plugins as possible. Many people use plugins for something that can EASILY be done with a few lines of code in your themes functions.php file.

Here are three functions.php edits I use on every single new wordpress install:

Custom Login Screen – 4 lines of code

With three lines of code you can customize your login screen with your logo.  Easy peasy. Upload your logo to your themes directory — change the file name — and wala.  Good to go.

function my_custom_login_logo() {
  echo '<style type="text/css">h1 a { background-image:url('.get_bloginfo('template_directory').'/yourlogo.jpg) !important; }</style>';
   }
add_action('login_head', 'my_custom_login_logo');

Remove wordpress update notice – 5 lines of code

I don’t want my end users seeing the wordpress update notice when they login.  I see it … that’s enough.  I don’t need emails from them telling me about it :)

add_action('admin_menu','bhhidenag');
function bhhidenag()
{
remove_action( 'admin_notices', 'update_nag', 3 );
 }

Remove all those extra links in the header – 9 lines of code (max)

Most of my wordpress sites aren’t blogs … and so I remove a lot of the bloggy links from the header.  You can pick and choose which ones you want to leave.  I never include the generator line because that just announces to the world what version of WP your site is running … “hello hackers, try to exploit me with my known bugs”.  LOL

remove_action( 'wp_head', 'feed_links_extra', 3 ); // extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links', 2 ); // general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link' ); // Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator' ); // WP version

Two Ways to Use Google Analytics Better

// July 30th, 2009 // 2 Comments » // tagged: > > >

Google Analytics provides GREAT data straight “out of the box”… I use it for every site I build. Recently – I started doing two new things with GA.

  • Tracking how effective specific ads (some regular ol’ plain text links too) were. We have a flash ad rotation on several of our sites … and I wanted to know how many people were clicking on what specific ads to get to other sections of the site. I wanted to know more than just “they came from the homepage”.  I wanted to know – did they click on the Antarctica ad or the New Zealand ad?  Did they click on the text link in the navigation?
  • Tracking outbound links to our social medial pages … we wanted to see how many people ended up on our facebook page through what specific ads and promotions.

Both of these require a little manual effort – you have to create specific links to gather specific data.

For the first — Google calls this CAMPAIGN tracking. As in—an ad campaign.  Makes sense :)

There are three things I’m keeping track of with this:

  • Campaign Source (utm_source): to identify a search engine, newsletter name, or other source where your ad is going to be seen (if you have an ad in an email – you’d put the name of email here)
  • Campaign Medium (utm_medium): to identify a medium such as email or cost-per- click. What type of ad is it? Banner ad, text link, or a link from an e-mail?
  • Campaign Name (utm_campaign): to identify a specific product promotion or strategic campaign. What promotion is this ad part of? Free shipping?

You can use Google’s URL builder here – or of course you can manually create your links. Once you know the format – it’s just as easy to do your own.

So for instance, let’s say I had an ad for football tickets that I placed in an email newsletter.  The URL to the event was:

a href=”http://www.mydomain.com/sportingevent.html”

In order to track the data for that specific URL –  I would change that link used in the email newsletter to be something like this:

a href=”http://www.mydomain.com/sportingevent.html?utm_source=july2009newsletter&utm_medium=email&utm_campaign=VUfootball09262009″

To view your analytics for these links:

  1. Login to Google Analytics
  2. In the left side-bar, select Traffic Sources.
  3. Then click on Campaigns.
  4. Select the Campaign Name you want to track. This is the Campaign Name you designated when tagging the ad URL above.

For the second – tracking our outbound links, we’re going to do a little javascript-ery-trickery to get what we want.

Without this – it’s pretty much impossible to track how people are getting to our social media sites. Those sites don’t live on our servers – so we can’t put the GA code on them.  We could track how many people click on a link on a specific page on our servers – but that gets kind of clunky tracking-wise.

So – what’s the best way to track which external links are popular with your site visitors?

(There is a javascript “addon” that will track this information (available here) — it will track external links and file downloads. Simply install the code right above the GA code on all your pages – and wala. You don’t have to manually edit each link.)

Here is how I prefer to track this information.

Our link starts out like this:

a href=”http://www.externalwebsiteurl.com/”

To track it … we’ll turn it into this:

a href=”http://www.externalwebsiteurl.com” onClick=”javascript: pageTracker._trackPageview(‘/outgoing/externalwebsiteurl.com‘);”

(you could make outgoing anything you want … but decide on a standard so that you can easily pull this data)

View the number of clicks to the externalwebsiteurl.com from your own website by

  1. Login to Google Analytics
  2. In the left side-bar, select Content.
  3. filter the urls by putting “outgoing” in the filter box.
  4. You’ll see the data for your tagged outgoing links here!

You could also use this for tracking file downloads.  Just change the /outgoing/ part to /downloads/ or something.

original url:

a href=”http://www.mydomain.com/assets/How-To-Waggle.pdf”

altered, google analytics tracking url:

a href=”http://www.mydomain.com/assets/How-To-Waggle.pdf” onClick=”javascript: pageTracker._trackPageview(’/downloads/WaggleHowTo’);”

The Matrix Runs on Windows

// February 11th, 2009 // No Comments » // tagged: > >

My Goodbye Gift for Josh

// September 24th, 2008 // No Comments » // tagged: > >

I had been thinking for weeks on ideas of things to give Josh as a goodbye gift … i wanted it to be something that represented his ministry here in Nashville, and also something that was “me”.  What I ended up with was this – a mosaic of images from every event since Josh started at FBC … in the shape of the student ministry logo.  I think it turned out well … and will be something he will keep forever and will always make him smile :)

Crosby-Student-Ministry_Lacy

Click the image for a BIG version … I had it printed and mounted 2ft x 2ft in size.

google chrome … *another* browser …

// September 7th, 2008 // No Comments » // tagged: >

chrome

Yep.  Love Google.  But this just means ANOTHER browser to add to the list of compatibility testing when developing for the web.  Which would not annoy anyone if we weren’t already spending hours fixing IE issues.  If only we could just make computers explode if they’re using IE 6 or less.

Creating Your Own Ringtones for the iPhone

// August 14th, 2008 // No Comments » // tagged: > >

iTunes Album Art Game 2

  1. Open iTunes.
  2. Find the song that you want to make into a ringtone.
  3. Listen to the song and find the part of it you want to use. The chorus may be a good place to start.
  4. Write down the start and stop times of the clip.
  5. Right-click the song and select “Get Info.”
  6. Click the “Options” tab.
  7. Type in the start time of your ringtone in the text box next to “Start Time” in the minutes:seconds (i.e. 2:01) format.
  8. Type in the end time of your ringtone in the text box next to “Stop Time.” Make sure the ringtone is no more than 40 seconds long.
  9. Click “OK”.
  10. Right-click your song again and select “Convert Selection to AAC” (be sure this is what you have your preferences set to for importing). Wait for iTunes to convert your song. It will create a duplicate version.
  11. Right-click the newly created ringtone and select SHOW IN FINDER.  
  12. Minimize that new finder window.  Go back to itunes
  13. Right-click the ringtone and select “Delete”.
  14. Click on the “Keep Files” button.
  15. Maximize the finder window from step 11.  Find the ringtone file. It will have an extension of “m4a.”
  16. Replace the “m4a” extension of your ringtone with “m4r”. You can either double-click slowly to re-name your file, or right-click and select “Get Info” on a Mac or “Rename” on a Windows PC.
  17. Click “Use .m4r” or the PC equivalent when the system warns you that the change may affect the use of your file.
  18. Double-click the ringtone file. ITunes will automatically add it to your ringtones folder in your iTunes Music Library.
  19. Connect your iPhone and sync your ringtones.

My iMac died

// April 19th, 2007 // No Comments » // tagged:

The impossible (or so the media and online world would have us believe) has happened.

My iMac died. Completely. Pressed the power key last Thursday … the apple logo appears in center, the spin wheel is spinning … and then an ominous dark grey screen descends. Then an even darker (and more ominous) little box appears in the center saying I am required to reboot.

I reboot approximately 37 times. Nada.

Then I reset the PRAM. Run Hardware Tests, Disk Utility.

Nada.

I can fix a PC with my eyes closed for the most part … but a mac. That’s another story. Especially an iMac that you can’t just pop open. I call my *mac guy* … he says it’s time to call my neighborhood apple store. Sigh.

I get an appointment at the genius bar … and carry my sad iMac up to the counter. You know you’re in trouble when the genius bar guy makes the sad sighing sound … tries 3 different keyboard/mice … 3 different firewire cables.

I hear them say “Complete hard drive AND logic board failure…”

Thank goodness it’s still under warranty … and applecare is worth every penny.

Got it back last night … spent this morning reinstalling and configuring.

Soo … don’t believe everything you hear. Macs do crash.

And I still love apple … ;)

A *real* computer keyboard comes with the Commodore Vic-20!

// December 7th, 2006 // Comments Off // tagged:

My first computer was a Commodore 64 … I remember my brother and I keying in pages and pages of code just to play a super simple game. One keystroke wrong … game doesn’t work and you start over. You want to play something else? Key the code in again. Play the game you were playing last week? Key the code in again.

Sigh …. Kids today just don’t know about having to *work* for anything … it’s all right at their fingertips with a click of a button or the wave of a Wii.

More fun 80’s stuff after the break ….

(more…)

What Microsoft is Up to

// September 6th, 2006 // 1 Comment » // tagged: > >

My brother sent me this very cool link to PhotoSynth - a project Microsoft is working on. It’s really amazing … although I’m sure if they ever release it to the public we’ll be paying for a license to use it. Why can’t Microsoft have some google in them….

Ever wondered what it would be like to walk through your digital photos in 3D or see what hundreds of other people shot at the same location? See Photosynth in action and hear how Live Labs is exploring new ways to change the way you think about the web.

Check it out!

Tivo Everywhere with Slingbox

// September 30th, 2005 // 1 Comment » // tagged: >

For only $249 – you can have access to your tivo (or regular television) from anywhere in the world. That’s right. You can watch that LOST episode on your tivo at home on your laptop in your hotel room in China. slingboxTivo isn’t required … but tivo people are the first ones who are going to latch on to this baby. Slingbox … clever name. Steve saw this a few months back on a business trip … and then last weekend we saw it live in CompUSA. Oh – and there are no fees. Very nifty.

(more…)