Full Screen Background Images

Posted

Full screen background images are a nice feature for a number of WordPress themes. It’s also one of the few theme modifications that can be handled well through a plugin.

Full Screen Background

The implementations I’ve seen generally use the jQuery script backstretch.js- which handles responsive layouts and large images elegantly.

If you’re not a theme developer and just want to add a full screen background to your site, I’d suggest trying out one of these plugins:

If you are a developer and want learn how to add this feature to a theme, read on.
Read more

Add UTM parameters with jQuery

Posted

On a recent project we needed to add UTM query parameters (for Google Analytics tracking) to all outbound links to a specific domain.

I didn’t feel like updated all the links on the site directly in the code since these campaign query strings might change, so I created a basic jQuery plugin to do this:

jQuery.fn.utm_tracking = function() {
	$(this).find('a[href^="http://www.example.com"]').each(function() {
		var url = $(this).attr('href');
		$(this).attr( 'href', url + '?utm_source=example&utm_medium=link&utm_campaign=campaign' );
	});
}

Read more

How to Find Free WordPress Themes

Posted

There are a lot of great WordPress themes available for free, but you’ll need to be careful about where you get them from. Bad themes with malicious code can bring down your server, alter links on your website, and cause other unsavory problems.

Free themes from reputable sources can be terrific though. Here’s some of the places I’d check first, with a few example themes from each.

WordPress.org

The theme repository on WordPress.org is the largest source of free WordPress themes. All themes go through a detailed code review and safe to use on your site. You can browse the featured themes, popular themes, and newest themes.

Expound

Some excellent free themes to try in the repository are Expound, Spun, and Bold Headlines.
Read more

banner-772x250

Convert Custom Post Types

Posted

Some themes and plugins use custom post types to store data for items like portfolio pieces or testimonials . This can be an issue if you want to switch to a new theme that doesn’t have support for that post type, or your plugin is no longer maintained.

Luckily, there’s a couple ways to convert custom post types to standard post types. I recommend using Post Type Switcher if you just have a couple items to switch. For converting posts in bulk, Convert Post Types is what you’ll want.

Convert Post Types Overview

Plugins Mentioned

Themes Mentioned

Instagram

Instagram Photos in WordPress

Posted

It’s quite easy to backup and display all your Instagram photos in WordPress thanks to the excellent DsgnWrks Instagram Importer plugin by Justin Sternberg.

I set it up with my theme Visual (free on WordPress.org) in just a few minutes. You can view it here.

The plugin can import all the photos you currently have and can also import new photos as they are published. There’s several options for how the images can be saved (post, page, post type), how tags/categories are applied, and whether they are published immediately or saved as drafts.

Straightforward Set Up

Instagram Plugin Screen

  • Install the DsgnWrks Instagram Importer plugin.
  • Go to the plugin page under “Tools” > “Instagram Importer”.
  • You’ll need to authenticate with Instagram before you can import photos. If you’re already logged in to Instragram, this will take just a second.
  • Most of the defaults work fine, but if you’re using the Visual theme, I would suggest a few changes:

    Images will show up twice if they are set as the featured image and also get inserted into the post content. So, you should disable one or the other if you’re using Visual. I updated the “Post Content” field to just show my image caption.

    I’d also update the “Imported posts status” field if you want to automatically publish each image. Just make sure you don’t have any other plugins activated that might send out an e-mail or tweet for each new published post when you do this.

  • If you have a lot of images, it will take a while to import them all. I’d recommend importing just a few at first to make sure everything is set up how like.

That’s it. Feels good to own your data, doesn’t it?

jetpack-banner

JetPack Infinite Scroll + Masonry

Posted

I added support for Jetpack Infinite Scroll on a theme of mine that uses Masonry recently.

Since I couldn’t find any good code snippets or recommendations for how the callback should work I wanted to share a couple methods I tried. If anyone has improvements or recommendations, please let me know.

All of these examples use the “post-load” javascript event that Jetpack triggers. You can read about that on the Jetpack Infinite Scroll documentation page. Read more

pixelated

Lazy Loading Images

Posted

Images are generally the heaviest assets on a webpage- so if you’re interested in fast load times for users, this is one of the best places to optimize.

Lazy Load Your Images

One popular technique for speeding up the initial load time is called “lazy loading”. It works by replacing the source of images (src=”/example.gif”) with a transparent placeholder image (src=”/pixel.gif”). This allows everything else on the page (text,fonts,scripts,etc) to render first. Read more

indicator

Drop Down Menu Indicator

Posted

I think it’s important to give users a visual cue when menu items have a drop down menu.

One way I’ve handled this in the past is to use the Superfish jQuery plugin, which adds a class to any list items with children. This allows them to be styled differently- with a background image of a down arrow (for instance).

menu-example

However, I just saw a new theme released by Paul de Wouters called Spine. Instead of using javascript to apply the class- he uses a custom Walker_Nav_Menu so that the class is added to the markup directly.

I think this is a much better way to do it, and solves an issue I’ve seen in some themes where the menu items shift a bit when the new classes and styling are applied with javascript.
Read more