Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1138862

    Hello there,

    When I click to a photo in masonry gallery, I see title text under image. But I want to see excerpt text under it.
    Screenshot
    Is that possible by codes? There is no option in mansonry gallery blog settings.

    I don’t mean grid view. I mean single photo view when I click to see.

    #1139129

    Hey Cemal Onur,

    I’m not sure I understand your request, since there is not excerpt for images?

    Best regards,
    Rikard

    #1139132

    I mean image captions text. Masonry gallery calls that like “excerpt” in option windows.

    #1140072

    Hi,

    Thank you for the update.

    This is possible, but you have to manually edit the title of the images in the Media > Library panel. The value of the title attribute is what the lightbox display as caption.

    Best regards,
    Ismael

    #1140177

    Hi Ismael,

    Thanks for answer. But I think you didn’t understand what I wanted. I already know that title value is shown at lightbox display. But I want to see capture value under image at lightbox display.

    #1140219

    Hi,

    Sorry for the confusion. We do understand your inquiry. What you need to do is put the excerpt or caption in the title attribute of the image manually. You can do that in the Media > Library. That is the only solution that will not require file modification.

    If you’re OK modifying the parent theme file, edit the js > avia-snippet-lightbox.js script. Look for this code:

    image: {
    			    titleSrc: function(item){
    				    var title = item.el.attr('title');
    				    if(!title) title = item.el.find('img').attr('title');
    				    if(!title) title = item.el.parent().next('.wp-caption-text').html();
    				    if(typeof title == "undefined") return "";
    				    return title;
    				}
    			},
    

    This code looks for the title attribute or the wp-caption-text container.

    Best regards,
    Ismael

    #1143078

    Hi Ismael,

    I have tried to change that code but it didn’t work. I deleted all that codes to be sure if it is about that code, there was not any change.

    Did you try it in your parent ? If you tried and it works what you did, may I learn your way?

    #1143289

    Hi onurized,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1143787

    Hello Victoria,

    Thanks for your answer. Example page is kazdaglariotel.com/projeleri/manisa-villa-bahcesi/

    I have shared admin informations as private content.

    #1144422

    Hi,

    Thank you for the update.

    We modified the js > avia-snippet-lightbox.js, have the script look for the content of the av-masonry-entry-content container, and use it as the title.

     titleSrc: function(item){
    				    var title = item.el.attr('title');
    				    if(!title) title = item.el.find('img').attr('title');
    					if(!title) title = item.el.parent().next('.wp-caption-text').html();
    				    if(item.el[0].classList.contains('av-masonry-entry')) title = item.el.find('.av-masonry-entry-content').html();	
    				    if(typeof title == "undefined") return "";
    				    return title;
    				}
    

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.