Flexslider is one of the most used sliders, for good reason. This snippet helps lazy load your images.
In order to create a perceived performance for users, we as authors shouldn’t allow the loading of every single image at once for sliders or carousels. In this snippet we only load the first and second image on init window load.
The following snippet when placed within WordPress’ functions.php will allow authors to add custom links to their profile and display for each author bio.
The following snippet when placed within a WordPress post loop will display a feature image uploaded via your media uploader and place it as a background image within a div tag.
If the desired output of the default WordPress post thumbnail is not enough you can easily adjust the PHP to output your appropriate class. <?php the_post_thumbnail(‘post-thumbnail’, array( ‘class’ => “YOUR CLASS”)); ?> More information can be found on the codex.
With the release of WordPress 3.7 you now can have your plugins and/or themes update happen behind the scenes.
Recently I had a great conversation with an outstanding User Experience designer about a few interactions on a project we were working on. One of the points we talked about was, what should happen when text within input fields are excessively long.
The desired result we both agreed on was to change the font size on the fly. Thankfully this is extremely easy with a little bit of jQuery that listens to events on the input field.
So if you happen to be in the same situation hopefully these snippets should get you heading down the right track.
If you use shortcodes within your WordPress theme you might need to also add them within your widgets. This little snippet does the trick.
Viewing telephone numbers on iOS device can provide an unpleasant shock. They tend to render in a default blue colour making your designs look broken.
If developing themes or plugins for WordPress sometimes it is handy to add a menu item to the WordPress admin bar to help quickly reference the desired action.
You can do various things with the admin bar but this snippet should help you get started.
If you have installed Google Analytics on your site, or for a client it is always helpful to exclude IP addresses so the sites stats give an accurate representation of the real traffic.