Programmatically add image tags to image links added to WordPress posts from the media library. Can be used to add custom styling or add a lightbox feature to all images added to posts without having to install a plugin.

The function below adds a css class colorbox and a rel attribute allowing me to implement a lightbox feature to my post images using the Colorbox jQuery plugin.

This post was written by Steven Soehl Tampa based web developer & designer, online marketer, and WordPress.

Tags

Posted Under: ,

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz