我已经更新了album-extend.php以显示来自画廊的所有图像,只要不涉及分页,它就非常适合。一旦我使用自定义字段(ngg_paged_Galleries)添加分页,它确实添加了第二页,但画廊丢失/不显示。因此,您只能看到第一页上的图库/图像,而不会超出首页。
我知道我错过了一些东西,但对于我的生活,我无法让它发挥作用。非常感谢任何输入!
谢谢!
我认为这就是问题所在:
foreach ($galleries as $gallery){
echo do_shortcode("[nggallery id=".$gallery->gid."]");
}
?>
这是album-extend.php:
<?php
/**
Template Page for the album overview (extended)
Follow variables are useable :
$album : Contain information about the album
$galleries : Contain all galleries inside this album
$pagination : Contain the pagination content
You can check the content when you insert the tag
If you would like to show the timestamp of the image ,you can use
**/
?>
<?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?> <?php if (!empty ($album)) :?>
<?php
foreach ($galleries as $gallery){
echo do_shortcode("[nggallery id=".$gallery->gid."]");
}
?>
<?php echo $pagination >
<?php endif; >