简体   繁体   English

Tumblr Photoset字幕不适用于Magnific Popup

[英]Tumblr Photoset Captions not working with Magnific Popup

I am using a Tumblr theme that has Magnific Popup pre-installed. 我正在使用预装有Magnific PopupTumblr主题。

The problem is that the individual caption of a photo in a Photoset does not appear anywhere. 问题是,个别caption一的photoPhotoset不会出现在任何地方。 I am guessing that the script does not know where to take that information from ( Tumblr hasn't been very helpful with their ambiguous {JSPhototsetLayout} either). 我猜想脚本不知道从何处获取该信息( Tumblr对其模棱两可的{JSPhototsetLayout}也不是很有帮助)。

Do you have any idea how to solve this? 你有解决的办法吗? Thank you so much. 非常感谢。

You don't (and shouldn't) have to replace anything in Magnific Popup's code, as far as I see in their docs you just have to search your theme to see where Magnific Popup is initialized and tell it where to get the caption from: 您不必(也不应该)替换Magnific Popup代码中的任何内容,据我在他们的文档中看到的那样,您只需要搜索主题以查看Magnific Popup的初始化位置,并告诉它从何处获取标题即可。 :

image: {
    titleSrc: 'alt'
}

I have no idea how Tumblr themes are structured but this approach seems pretty straight forward. 我不知道Tumblr主题的结构如何,但是这种方法似乎很简单。 Try a search in project (or something similar) in your IDE for the "magnificPopup" keyword, it should eventually lead to the bit of code similar to the one in the link above. 尝试在IDE中的项目(或类似内容)中搜索“ magnificPopup”关键字,它最终将导致类似于上面链接中的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM