Support » Theme: Customizr » Show image title in fancybox galleries, not page title?

  • The parameters passed to fancybox (the gallery/popup image viewer) currently make it show the page’s title for each image. Could this be changed so that each image shows its own alt or title?

    In the meantime, anyone know how to modify the code to make this happen?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you manage to find an answer. I am trying to do the same. The code posted on themesandco did not work for me.

    Yes, I did, but I’m not able to access my notes on how I did it for another week. Check back here in a week (unless of course someone else knows, or can see how I did it on ).

    Thanks, I will wait until you can access your notes. Looks good on your site, thats what I need.

    OK, I’m back now.

    From what I can see, I edited class-fire-ressources.php
    and changed the fancybox stuff to:

    <script type="text/javascript">
    				jQuery(document).ready(function( $) {
    			      // Fancybox
    			        'transitionIn'  : 'elastic' ,
    			        'transitionOut' : 'elastic' ,
    			        'speedIn'   : 200,
    			        'speedOut'    : 200,
    			        'overlayShow' : true,
    			        'hideOnOverlayClick' : true,
    			        'autoScale' : <?php echo ($autoscale == 1) ? 'true' : 'false' ?>,
    			        'changeFade' : 'fast',
    			        'enableEscapeButton' : true,
    			        'overlayOpacity' : '0.3',
    			        'onStart' : function(currentArray,currentIndex){
    			           var obj = currentArray[ currentIndex ];
    			           this.title = $(obj).find('img').attr("alt");
    			        'titleFromAlt' : true,
    			        'titlePosition' : 'inside'

    One thing I found is that if you use captions that are long, they won’t wrap in the black rounded boxes. You have to pull them inside the white frame to get them to wrap properly (hence the 'titlePosition' : 'inside' line).

    Two other changes you may note in there are:
    'overlayShow' : true, , 'hideOnOverlayClick' : true, and 'overlayOpacity' : '0.3'. These enable the background (‘overlay’), make it grey (0.3, on a scale of 0 to 1, if I recall correctly), and allow you to click on the background to close fancybox.

    Let me know if this works for you.

    Worked perfectly, thank you so much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show image title in fancybox galleries, not page title?’ is closed to new replies.