Sharing my day-to-day experiences as a web designer, WordPress developer, and front-end engineer.
For the past 4 years or so I have been sharing lessons I learn in my day-to-day work here at kevinleary.net/blog. Sharing my experiences working with WordPress and other open-source web technology is something that I truly enjoy.I am grateful for the fans I have gained, arguments I have sparked, and people I have helped. Sharing my knowledge freely to others that are willing to learn is my small attempt at giving back to the wonderful WordPress community. The team at Automattic, and the community of talented theme and plugin developers, has given far more to me than I can ever give to them.
Over the years I’ve learned a few harsh truths about the WordPress community, and open-source communities in general, for that matter. There are hordes of people out there who have unrealistic expectations about what to expect when they receive something for free. WordPress is incredible software that has undoubtably taken thousands upon thousands of hours to develop.
Astonishingly this is provided to anyone free of charge at WordPress.org, yet there seem to be neverending criticisms about issues specific to individual environments, custom setups and out the box scenarios. It’s not uncommon to see “bug” reports in the support forums. Quite often these “bug” reports describe “missing” features. Read More
Lately I find myself re-using these handy bits of code in many of my WordPress themes. They will help you identify the name of the current template file being used in the front-end or admin. If you’re interested in checking against the current theme template then you should check out the core is_page_template() function.
To get the name of the current theme template file name you need to intercept the template_include filter and save a new PHP global variable that can be referenced anywhere. Read More
WordPress has an extremely powerful, lesser known trick to easily let you view and edit a complete list of all the editable database settings for your site, including fields added by plugins. Enabling this menu for admin users is easy, just use the following code in your `functions.php` file. Read More
Thanks to the hard working developers at Automattic, and the many contributors to the WordPress plugin repository, the API’s, plugins, and development capabilities available to WordPress theme developers and website managers is tremendous.
Most of the work I do is customized theme and plugin development, and I take content management very seriously. Project after project I have recognized patterns in the tools, techniques and plugins I use time after time. I’ve crafted a list of resources and guidelines I typically follow during the course of a professional quality WordPress project. Read More
Over the past year Facebook, Twitter, LinkedIn, Google+, and other social media websites have continued to gain popularity around the web. Providing users with simple and easy ways to share content is now, without a question, a web design standard. Adding widgets to your website is easy, but the scripts provided by most major social networks can cause a significant increase in page load speed.
Using the following jQuery/AJAX loading method you can significantly decrease the initial load time of your website. This method is currently being used on the OpenView Venture Partners blog, where we have seen a 500% improvement in page speed, reducing the time it takes for a new visitor to load a page by 12 seconds (15 seconds to 3 seconds) according to Pingdom Tools. Boston Innovation is also using a modified version of this script combined with the jQuery Sonar plugin for lazy loading created by ArtzStudio.
WordPress allows you to add a description, caption, title and link onto any media attachment. But what if you want to add custom fields to your images, video or audio files? This can be done by manipulating data with the attachment_fields_to_edit and attachment_fields_to_save filters. Read More
Allowing your users to share your content in the easiest, best way possible is important these days. With the help of Open Graph Protocol you can easily control the images, titles, descriptions and other metadata that is used by major social networks including Facebook, Twitter, Google Plus & LinkedIn.
Tracking popular posts in WordPress often involves the use of a plugin. Many of the popular posts plugins out there come with tons of configurable options that you don’t need.
If you’re interested in a simple, bare bones method for tracking the popularity of a page, post or post type then perhaps this handy function will help you out.
Have you ever noticed that an unwanted popup tooltip appears when you hover over an image in WordPress? This is created by the title attribute that is automatically added for many image attachments (including post thumbnails). Removing this attribute from all of your images can be done with the following handy function.
/** * Remove image titles * * Remove the "title" attribute from all image attachments and functions * using the wp_get_attachment_image() function * * @param $attr An array of attributes for the <img /> * @return $attr Filtered attributes without the title */ function remove_attachment_title_attr( $attr ) { unset($attr['title']); return $attr; } add_action('wp_get_attachment_image_attributes', 'remove_attachment_title_attr'); |
Just add it to your theme’s functions.php file.
When I began working with API’s a few year ago I was incredibly excited. The amount of data I had at my fingertips was overwhelming. I had the ability to create a full scale application with someone else’s data, and it was was mind boggling. Today I find myself using API’s in almost every project I am a part of. They have become a vital aspect of any modern website, and a vital skill for any modern web developer.
When you work with an API you are accessing someone else’s information. This process is generally very slow and the more information you request, the slower it gets. You are often limited to the number of times you can request data from someone. This makes server-side caching an ideal solution to dramatically improve the speed of displaying API results.
I was recently working with a pretty large request to the Indeed API. The response contained about 320 jobs, and took about 4-5 seconds each time. The following caching method cut the request time down to 0.08 seconds.
Browser cache can speed up a website tremendously, but it can also cause web development headaches in the process. Have you ever uploaded a modified image, stylesheet or JavaScript file only to find that an out of date version is loading for the majority of your users?
This can quickly snowball into a usability nightmare. Fortunately there is a simple way to solve the issue using this PHP auto versioning function. This is a modified version of a concept posted by Kip on StackOverflow). Read More
There are a more than a few ways to add pagination, or “paged” links, to a WordPress theme. One popular method involves using the WP-PageNavi plugin. This plugin is great for someone non-technical who wants to add pagination onto their current WordPress site, however it’s not an ideal option for a theme developer. Jacob Gold at 10Up wrote a great article on Smashing Magazine that discusses using a lesser-known WordPress function to handle the heavy lifting.
Dmitry Fadeyev has created a great library of re-useable LESS classes called elements, and I been using it extensively in my work. Elements.less contains a set of re-useable classes and mixins that help you cut down the size of your stylesheets, while speeding up your CSS workflow. I highly recommend checking it out!
.gradient .bw-gradient .bordered .drop-shadow .rounded .border-radius .opacity .transition-duration .rotation .scale .transition .inner-shadow .box-shadow .columns .translate
For more information visit the home of Elements.less.
With Google now considering site speed as a ranking factor, it’s important to keep your site running at it’s fastest. There are many ways to improve the performance of a WordPress website. Using a content delivery network is one of the best bang for your buck methods. But how much faster can a CDN really make your website? Let’s take a look at a real world case study.
I’m going to install MaxCDN, an affordable CDN option starting at $39, onto 3 high volume WordPress websites and track the results to find out. In order to analyze the effectiveness of the CDN I need an accurate measure of each sites current speed, before any adjustments are made. Pingdom provides a great set of speed testing tools to help with this.
Updated June 1, 2011 — When you start to use WordPress as a CMS you begin to realize that one WYSIWYG area isn’t going to cut it. At that point you may start to explore the option of custom fields. They’re great, and they work well for handling small changes. But what happens when you need to have multiple WYSIWYG areas, or upload files, or manage content using other form fields like checkboxes, radio toggle’s or text inputs.
To do this you’ll need the power of custom meta boxes. There are many ways to create them; some involve the use of plugins and some don’t. I’m going to discuss a few of the way’s I’ve created custom write panels, and explain the ups and downs of each approach. If anyone has any suggestions please leave your thoughts as comments; they may be added to the post in the future.
If you work from home these tips may help you create a productive and healthy home office environment.
Whenever you find yourself questioning your organization methods, or wondering about the best way to file something, keep the K.I.S.S. principle in mind. Read More
Microsoft Word works great for creating stationary and printed documents. However, if publish content on the web there are a few formatting issues you should be aware of. When you copy and paste your Microsoft Word content into a content management system like WordPress it’s proprietary HTML code is preserved, producing very messy HTML that can lead to browser and layout issues. The same thing happens with other text editors like OpenOffice.
It can be hard to describe this to content writers. It’s not uncommon to find many WordPress blog posts riddled with nasty Microsoft Word HTML. How can you solve it? Kill it at the source by automatically filtering all content pasted into the WYSIWYG/Visual Editor (in WordPress this is called TinyMCE) . Read More
Vintage style typography has begun to spring up all over the web design industry, so if you’re looking for some inspiration for your next mood board hopefully this list of 100 great examples of vintage and authentic inspired typography and type design can help. Read More
A close friend constantly jokes about my new remote role, claiming that it won’t be long before I’m a social vegetable. It’s true, it is tough to cut out the human interaction you get from a traditonal office environment.
With a little creativity you’ll soon realize that working at home doesn’t mean giving up your day-to-day social interactions. There are tons of ways to keep your social skills from deteriorating while working remotely.
If you don’t have an office, it’s important to mingle with like minded individuals in your field. I highly recommend attending a few local meetups related to your industry. It’s a great way to socialize with passionate people, and it’s completely free!
Meetup’s are a great way to build new relationships with professionals in your area. I try to make it to the Boston PHP & Boston WordPress meetups whenever possible. I’ve even spoken at a few.
I’ve only done this a few times myself, but a former colleague and friend who works remotely swears by it.
It’s nice to encounter everyday conversations in the background, and it can improve creativity by mixing things up a bit. It also keeps those brain neurons firing!
If you’re a social person at heart and can’t do without the daily conversations that happen at work then I would suggest looking into renting a desk at an office in your area.
I highly suggest finding a place where you are surrounded by individuals closely aligned with your personal and professional goals, it helps create a productive environment by driving the incubation stage of creativity. Surrounding yourself with like-minded, driven professionals also has incredible benefits in fulfilling life goals.
LESS will make your CSS coding incredibly easy to maintain and iterate on in the future. If you’re still building websites without it, you’re an idiot.
LESS is a language that enhances CSS to make it more modular by following D.R.Y. development practices. With it you can use functions, variables, operations, nested rules and other standard programming methodologies in your CSS files. It’s dead simple to use, and improves your productivity 10 fold (at least).
3 days ago by Addison Duvall at Speckyboy
10 days ago by Paul Andrew at Speckyboy
11 days ago by Mat Helme at Treehouse
12 days ago by Anonymous Contributor at The
12 days ago by behanceteam at 99U