Infinite Scroll in WordPress

Infinite scroll has become a standard feature in many web applications. Twitter and Facebook are the ones I use every day, but it’s also in a ton of Tumblr themes and Cargo Collective sites.

I feel WordPress themes has been slow to adopt infinite scroll- but after adding it to my site over the weekend I understand some of the complications.

(The Infinity Pool comes close, but it’s not as cool cousin, Infinite Scroll. CC Image. )

Unlike Tumblr or Cargo Collective, WordPress (.org) users can use plugins to add all sorts of javascript to posts. On my site Syntax Highlighting is the main culprit (which I use to display code snippets), but many others have social buttons or lightboxed images.

When infinite scroll pulls in additional posts via ajax, it doesn’t load the javascript code from the header or footer of the post that might be needed to display js content (e.g. social buttons, formatted code, etc) properly. That puts theme authors in a bind. Infinite scroll may be a better end user experience, but it’s going to lead to more support requests during theme set up.

However, if you don’t use much javascript in your post content, or if you display excerpts on your index pages rather than full posts, I’d suggest trying it out.

Ben Balter made a fork of the popular Infinite-Scroll plugin which is excellent. It’ll hopefully get merged into the .org plugin version soon (which I can’t recommend using in its current state). If you use Ben’s version of the plugin you should be able to set up infinite scroll for your theme in just a couple minutes. You can also see it in action on his site.

I’ll also posted a tutorial about how to add Infinite Scroll to a theme without a plugin.

Useful Links:

WP Engine Hosting Review

I’ve hosted most of my sites with BlueHost the last six years, but I recently migrated this one over to WP Engine. I was mainly curious to see what the impact on page speed would be. As WP Theming has grown in traffic so have load times– despite good caching, gzipped files, minified scripts and css, and sprited images.

Page Speed

The home page of the site had a page speed score of 96% before the migration and roughly 81% after. No theme code changed and the only plugin removal was W3 Total Cache. However, load times improved significantly (as measured by Google):

This Google Page Speed graph shows that page speeds were 1.47 seconds faster after the migration, which is 25% improvement.

You’ll notice average page speed is 1.47 seconds faster, which is a significant 25% improvement. I’d venture to guess the numbers might be even more impressive for someone who had not already worked to optimize load times.
Continue reading

TypeKit on Body Text

There are a number of solutions for rendering “non-standard” web fonts on your site.  I was familiar with ones like SIFR and Cufon where it’s recommend to be used only on headers or certain spots of the website.  I e-mailed TypeKit to see if it worked the same way, and got this reply from Mandy Brown:

“There’s no file size or speed issue with using Typekit for body text (as there would be with, say, using SIFR or Cufon). That said, you should make sure to use a font that works well at small sizes and renders acceptably cross-browser. Be sure to take a look at the browser screenshots before deciding on a font.”

Oddly, Google failed me on this question, so I thought I’d post it here for anyone else who was curious.

What’s Next for WP Theming

I’ve been working as freelance web developer for the last couple years working almost primarily with WordPress. I’ve enjoyed every minute of it, but I was recently offered the opportunity to work full time with Demand Media.

Demand Media runs eHow.com, Trails.com, Livestrong.com (among others) and social widgets that are viewed on millions of pages per day. It’s a really exciting company and position. Couldn’t pass it up. I start today, which also just happens to be my 29th Birthday.
Continue reading

How to Refresh Your Browser

Browser Refresh ButtonWhen you view a website, your browser will usually save a copy of all the files onto your hard drive. This is called a browser cache. It does this so the page loads quicker the next time you view it and everything doesn’t need to be downloaded again.

Browsers will generally be able to detect if the website has been updated and get a copy of the new files, but sometimes it fails. This is especially true if your web designer has been changing background images or xml files. To see those changes, you will need to refresh your browser.

Here’s a short video screencast explaining how to refresh the browser in Firefox, Safari, Google Chrome, and Internet Explorer 6.
Continue reading

Signing up With BlueHost

I use BlueHost for all my personal website hosting. In the last six years I’ve received excellent customer support and rarely had downtime on my site. At $6.95 a month it’s one of the cheapest options out there, it’s great for WordPress, and it should cover the needs of most small to medium size companies. Also, if you sign up with BlueHost, they give me a $65 referral fee which I credit towards your bill.
Continue reading

Screencast Tutorial for Gallery Shortcode

A lot of people rely on plug-ins like NextGen to display images on their website, but the built-in WordPress gallery actually works quite well for most situations. Here’s a short video tutorial explaining how to use it. I recommend checking out the codex for deeper explanation of the shortcode and the jQuery Lightbox For Native Galleries if you want a better presentation for clicked images.
Continue reading

5 Reasons to Kill the Splash Page

Splash screens and intro pages are a remnant left over from the early days of the web. It’s typically a flash animation or an introduction graphic that users need to skip past in order to view the actual content of the site. They’re becoming extinct because of SEO reasons, but I’d say at least 50% of my clients still request one.

On principle I won’t do it. I’ll politely refuse and give my reasons. And so far I’ve never had a client turn down a proposal down because I wanted their site to rank better in Google, or because I wanted their users to have a better experience . Here’s five reasons to drop the splash page and make the web a better place:
Continue reading

WordPress Theming Live

When developing projects with WordPress the same questions come up repeatedly. People tend to ask which themes to use, which plug-ins work best, and what can they really do with WordPress? This site is my attempt to answer those questions as best I can.

Quality Themes

For most small WordPress projects, a free or low cost theme is the way to go.  I am developing a section of the site showcase my favorite themes, all of which have been tested and work well.  If you are a developer with a new theme, or are using one that I haven’t posted, please send me a note.

Plug-in Reviews

When adding new features to sites, be it a twitter feed or a photo gallery, my first stop is generally the plug-ins repository.  There’s not always a solution that works perfectly, but in most cases it works well enough and is a lot quicker than developing my own.  I’m planning to review all the plug-ins I use regularly here, and add new ones as they appear.

Tutorials and Time Savers

Here’s my tips and suggestions for developing with WordPress- a lot of which are posted here just so I don’t have to look up them up again.  If I run into a problem, I’ll post about it, and hopefully help someone out there with a similar problem.