【发布时间】:2013-07-09 10:03:17
【问题描述】:
我创建的简码不再正常工作。昨天它工作正常,我设法使用它。
基本上,我创建的简码是灯箱 javascript,如果您单击缩略图,它会变得更大。
这是问题的图片
http://i255.photobucket.com/albums/hh140/testament1234/broken_zps2bdc406b.jpg
这是页面的链接
http://chrisadebahr.com/my-beautiful-family/
基本上在 mozilla 上显示一个灰色框容器,而在 google chrome 和 IE 上显示一个损坏的图像图标。
我很肯定,昨天我测试短代码时它工作正常。不确定它是否与wordpress有关
FUNCTIONS.PHP
这是我的functions.php中的代码
//Gallery Shortcode 2
function short_gallery($atts, $content = null) {
extract(shortcode_atts(array(), $atts));
return '<div class=" gallery_box"><div class="inner_gallery"><a class="fancybox" href="'.$content.'"><img src="'.$content.'"/></a></div></div>';
}
add_shortcode("gallery", "short_gallery");
CSS
这是我的样式中的代码。
/*GALLERY SHORTCODE STYLES*/
.gallery_box{background-color:#E8ECEF; float:left; margin:0px 20px 20px 0px; width:250px; height:200px; overflow:hidden; border:5px solid #E8ECEF; }
.inner_gallery img{max-width : 370px; max-height : 370px;}
简码易于使用。例如
[Gallery]http://chrisadebahr.com/wp-content/uploads/2013/07/ESL-Heat.jpg[gallery]
【问题讨论】:
标签: html css wordpress function shortcode