How would i go about in order to give every 4th image an unique dl-class? I guess this would be done in the media.php file. I was able to echo the $id which gave every dl an unique class. I also tried to echo the $menu_order but that didn't work.
How would i go about in order to give every 4th image an unique dl-class? I guess this would be done in the media.php file. I was able to echo the $id which gave every dl an unique class. I also tried to echo the $menu_order but that didn't work.
don't edit core files - any edits will be lost with the next upgrade.
instead, create a new shortcode in functions.php of your theme;
example: http://pastebin.com/zLBmu7ae
this is the edited line:
$output .= "<{$itemtag} class='gallery-item".(($i % $columns == 0) ? " unique" : "")."'>";
it will set the .unique class for every column-th image; i.e if you have 4 columns, it should do what you want.
(not widely tested)
You must log in to post.