Skip to Content

WordPress: handling user meta

We’re usually accustomed to store the metadata associated to WordPress posts and pages by using the update_post_meta() function. This of course works for posts but what about WordPress users? WordPress already provides a series of fields in each user’s profile. These fields, however, fall short when it comes to associate other types of values to user, for example their orders or their preferences about the contents of our site.

Continue Reading

jQuery: calculating slide dimensions on responsive slideshows

Responsive slideshows are interesting: if you try to use the width(), outerWidth(), innerWidth() jQuery’s methods, a 0 value is what you’ll get for the dimensions of each slide. Even more interesting is the fact that the object returned by the JavaScript’s getBoundingClientRect() will show a 0 value for its width property. This is because we’re working with fluid slideshows.

Continue Reading

jQuery: image preview like Google Images

During the last two months I’ve been working a lot with images on the client-side. Surely an interesting feature for image galleries is the ability to show dynamically the relevant information just below the current image or the current line. This is exactly what Google Images does.

Continue Reading