WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I want id="fancybox" and rel="photogallery" added to the generated automatically once it is "inserted into post" from the media gallery.

Thanks in advance!!!

share|improve this question

marked as duplicate by toscho Mar 16 '13 at 23:33

This question was marked as an exact duplicate of an existing question.

Justin Tadlock's Cleaner Gallery plugin can do exactly that and comes with a couple other nice features. It supports 18 gallery scripts, FancyBox included.

share|improve this answer
I'm straying away from plugins for this, i just need a function.php fix,i'd prefer to work it into my theme. – Christopher Apr 23 '12 at 23:51
Fair enough. You'll want to look at the post_gallery filter then. adambrown.info/p/wp_hooks/hook/… – mrwweb Apr 24 '12 at 1:08

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