Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Nexgen gallery wordpress不显示图像_Php_Jquery_Wordpress_Gallery - Fatal编程技术网

Php Nexgen gallery wordpress不显示图像

Php Nexgen gallery wordpress不显示图像,php,jquery,wordpress,gallery,Php,Jquery,Wordpress,Gallery,我已经更新了Nexgen gallery插件,它停止在我通过自定义PHP代码获得的页面上显示库 这是我用来获取图库的代码 $nggdb = new nggdb(); $images = $nggdb->get_gallery($post->post_name, 'sortorder', 'ASC', true, 0, 0); foreach($images as $i=>$image) { // list($originalWidth, $originalHeight)

我已经更新了Nexgen gallery插件,它停止在我通过自定义PHP代码获得的页面上显示库

这是我用来获取图库的代码

$nggdb = new nggdb();
$images = $nggdb->get_gallery($post->post_name, 'sortorder', 'ASC', true, 0, 0);
foreach($images as $i=>$image) {
    // list($originalWidth, $originalHeight) = getimagesize($image->url);
    // $ratio = (float)$originalWidth / $originalHeight;

    // if($ratio > 1.2) {
        // $class = "width-2";
    // } else {
        // $class = "";
    // }

    ?>
    <a class="fancybox" href="<?php echo $image->imageURL; ?>">
        <div class="grid-item col-md-3  col-sm-6 col-xs-12">
            <img src="<?php echo $image->thumbnailURL; ?>" />
            <?php
            if($image->_ngiw->_cache['description'] != "") {
                ?>
                <div class="title">
                    <?php echo $image->_ngiw->_cache['description']; ?>
                </div>
                <?php
            }
            ?>
        </div>
    </a>
    <?php
}

?>
$nggdb=新的nggdb();
$images=$nggdb->get_gallery($post->post_name,'sortorder','ASC',true,0,0);
foreach($i=>$image形式的图像){
//列表($originalWidth,$originalHeight)=getimagesize($image->url);
//$ratio=(float)$originalWidth/$originalHeight;
//如果($比率>1.2){
//$class=“宽度-2”;
//}其他{
//$class=“”;
// }
?>

我只是用post ID更改了post\u名称并开始工作

$images = $nggdb->get_gallery($post->ID, 'sortorder', 'ASC', true, 0, 0);

下面是正确的代码。

有错误吗?降级插件吗?检查nextgen gallery页面吗?它非常活跃,如果你只升级了插件,但它停止工作,你不是唯一一个。