Useless Stuff

Featured images (thumbnails) in menus

Posted 12 years in | Comments (98)

The following code will let you use featured images as thumbnails in your custom menus. Paste this in your child theme functions.php file, or theme settings > Advanced > User-defined code:

atom()->setContextArgs(‘primary_menu’, array(‘walker’ => new ThumbMenuWalker()));

class ThumbMenuWalker [...]

Custom avatar images in WordPress

Posted 13 years in | Comments (83)

This is a short walktrough on how to let your website users upload their own avatars, without using a plugin.
First, define the maximum image sizes (note that we will only downsize, smaller images will get browser-resized):

define(‘MAX_AVATAR_WIDTH’, 96);
define(‘MAX_AVATAR_HEIGHT’, 96);

This [...]