在我用于博客的模板中,此js方法
document.write(bp_thumbnail_resize("<data:post.thumbnailUrl/>","<data:post.title/>"))
据我了解,用于在每篇文章中添加缩略图。但是我不知道如何制作post.thumbnailUrl来保存要添加到帖子中的图像URL。
我的博客。您会看到只有帖子没有缩略图。
谢谢
我用一个简单的js脚本来做到这一点。
var t2 = " <data:post.title/> ";
if(t2== " COD Server Setup "){
var e = "https://lh4.googleusercontent.com/-PIcMPlHmFt4/UlkBYbUzOtI/AAAAAAAAAQE/6I26Y6aNnPM/w540-h390-no/CSESign.jpg";}
else if(t2== " Same thing "){
e = "https://lh4.googleusercontent.com/-162ZlFQDm1w/Ulj-NoFTknI/AAAAAAAAAPQ/NwTG2lHXROE/w180-h130-no/sample1.jpg";}
else if(t2== " Testing Post "){
e = "https://lh4.googleusercontent.com/-162ZlFQDm1w/Ulj-NoFTknI/AAAAAAAAAPQ/NwTG2lHXROE/w180-h130-no/sample1.jpg";}
else{
e = " ";
}
document.write(bp_thumbnail_resize( e,"<data:post.title/>"));
使用此功能时,每次添加新帖子时,我都必须编辑代码,以便为帖子添加缩略图。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句