imsanity

Handy image plugins to keep you sane.

I’ve been meaning to write a post about a few handy plugins that I use all the time. Some of these have saved me tons of time and effort.

My favourite one, and I’m sure lots of developers will agree, is Regenerate thumbnails. While working a theme, if you decide to change an image size of aspect ratio, this plugin will simply go through all of the images in your media library and resize them at once. Fantastic tool.

A new one I discovered a few months ago via twitter, is Imsanity. This tool is brilliant and makes so much sense. I’ve had clients upload 8MB images in the pass and these just end up clogging up the server. This plugin automatically resizes huge uploads to a decent more reasonable large size.

I’ve been a huge fan of the image widget plugin for a very long time. I’m not sure if there’s a better one out there, but this one does exactly what it says, very simply and elegantly. I love it.

Finally, this new plugin, hilariously called My Eyes are Up Here allows you to control how thumbnails are cropped based on face control. I haven’t had the chance to play with it much, but it looks like a great plugin and the authors are stellar developers. I’m guessing this one will soon be everyone’s favourite.

What image plugin have you found awesome? Care to share?

WPyogi is now part of wpbeginner

I set up wpyogi.com years ago after setting up a WordPress course.It took me so long to prepare that material, that I decided to put it up online for students to use on their own and for teachers to use in their class room. I no longer teach and as a result the material now needs updating. A few weeks ago I reached on on twitter to see if anyone would be willing to take over the domain and Syed at WPbeginner kindly agreed. Not only did he take the domain name, but also took the content with the aim of updating it soon.

I look forward to seeing how the content evolves.

To Do list

Why bother with WordCamps?

I had a great time at WordCamp Vancouver this weekend. I had the privilege of hearing great talks, had great conversations and learned a few things. At the end of the day, someone who I just met, asked me a very interesting question. “What do I get out of attending WordCamps?”

I had to think about it for a few seconds. My first reaction to that question was, does he mean financially and does attending help my business? He then proceed to clarify that yes, that’s what he meant, but then also said, has it improved me as a developer to which the answer is YES.

I think that the big thing for me is that WordCamps, do NOT generate leads and thus I don’t consider them as big networking events where lots of business deals are made. However, it does get be motivated to learn and research more about the topics I discovered that day/weekend and in turn, makes me a better developer which then generates “better” business for me.

This weekend was no different and I was encouraged by his question to make a list of the all the things I need to go and learn more about. I thought I would share it would you. So here goes:

  1. Review Mandi Wise’s extensive list of resources
  2. Make sure to watch Mel’s presentation about making your own custom widget when it is published on WordPress TV, because I just couldn’t be in two rooms at once
  3. Look into WP CLI. I’ve known about this long enough… Enough with the procrastination already.
  4. Play with Flexbox and Picture fill… again, stop procrastinating
  5. Make a fully accessible theme and add it to the repo

That list isn’t too long, but some of these items may take me a while… What about you, what do you get out of WordCamps?

WC YVR

See you at WordCamp Vancouver 2014

WordCamp Vancouver is just around the corner and if you do any kind of development work with WordPress, you should join us. This year’s WordCamp is the developer edition and the schedule has something for everyone. WordCamp is held on July 26 at the BCIT campus downtown Vancouver. Tickets are on sale and going fast, so make sure you grab yours soon.

I’ll be doing a lightning talk on handling multiple screens and responsive design using CSS and mobble. If you’ve never used the plugin you should come by and ask your questions. If you have any right now, feel free to leave a comment and I’ll do my best to answer you right away or I’ll chat to you at the conference. See you there.

Gitbook

GitBook Resources

I’m constantly amazed by how much great information can be found for free. I’ve been lagging behind in learning javaScript and recently discovered this great book. It teaches the basics and is intended for everyone who wishes to learn JavaScript. It doesn’t go in much detail, but it’s beautiful and very well laid out.

Digging a bit further and reading about the author, I discovered GitBook. GitBook is an open source platform that let’s authors publish books for free using Markdown and Git. If you’re not familiar with these, don’t worry, you don’t need to know about this stuff just to read the books. There were 174 books to choose from when I last checked and many are offered in multiple languages.

Have a look and see if something catches your interest. I’m reading ProGit next.

water-lily

Introducing Water Lily

Water lily is my latest theme released on the WordPress repo. I had initially chosen lotus, but that theme name was already taken and since all names must be unique, I had to content myself with water lily. This process did teach me the difference between water lilies and lotuses though. Seems like many make that same mistake.
Read more…

How to add a caption to featured images

Featured images are awesome and if you’ve ever wanted to add an image above the title of your post, using a feature images is the way to go.

When adding images in your posts or pages, adding a caption is easy, but if you’ve tried to do the same with featured images, then you’re out of luck. This is problematic if you want to use images from the Creative Commons where a photo credit is requested.

Faced with this problem this morning I did a quick google search and found the following answer on Stack Overflow.

Easy peasy once this snippet of code is added to your functions.php

function the_post_thumbnail_caption() {
  global $post;

  $thumbnail_id    = get_post_thumbnail_id($post->ID);
  $thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));

  if ($thumbnail_image && isset($thumbnail_image[0])) {
    echo '<p class="caption">'.$thumbnail_image[0]->post_excerpt.'</p>';
  }
}

Then use the following in your single.php.

<?php if ( has_post_thumbnail() ) : 
  the_post_thumbnail( 'feature' );
  the_post_thumbnail_caption();
endif; ?>

And Voila!

WTFPL Photos to use for Free

Theme developers and web designers often need photos to work with as placeholder. Place Kitten is a fantastic resource, but sometimes you may want something other than a kitten. Finding the right photo can be tricky, since there are so many licences, rules and regulations. Of course the easiest way to get photos is to just go out and shoot your own… I’ve been snapping pics for a few years now and I’ve amassed a large set of them on Flickr.

Today, I created a new set and decided to share them under the WTFPL. This license is pretty permissive and allows you to take any of these and just do whatever you want with them. So go ahead, help yourself.