If you are using custom URL’s for your gallery thumbs, then you might also want to make those links open in a new tab.
To add this functionality, simply add the following code snippet to your functions.php file:
function foogallery_links_new_tab($attr, $args, $foogallery_attachment) { $attr['target'] = '_blank'; return $attr; } add_filter( 'foogallery_attachment_html_link_attributes', 'foogallery_links_new_tab', 10, 3 );
Please note that you will need to set your gallery “Link To” setting to use custom URL’s:
Also please note that this will be applied to ALL galleries. If you want to limit this to a specific gallery, then you could check the ID of the global $current_foogallery;