Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Current my images are like this on the blog

<p><a href="http://site.com/pic.jpg" rel="lightbox[1082]"><img src="http://site.com/pic.jpg" alt="" title="post title" width="400" height="266" class="alignnone size-medium wp-image-10084" /></a>

How can I add a div class around this image?

share|improve this question
See this question – One Trick Pony Sep 16 '11 at 2:51
@mike - Obviously you could just type it in, right? But I assume you are concerned about the fact that the editor might be stripping your <div>s? More detail in your question would help. Are you using WordPress.com, or self-hosted? Are you a developer (i.e. you can code a plugin in PHP) or are you an end-user? – MikeSchinkel Sep 16 '11 at 3:24

closed as not a real question by toscho Jul 14 '12 at 21:48

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

<p><a href="http://site.com/pic.jpg" rel="lightbox[1082]"><img class="yourclass" src="http://site.com/pic.jpg" alt="" title="post title" width="400" height="266" class="alignnone size-medium wp-image-10084" /></a>

Replace "yourclass" with the div class name.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.