【问题标题】:(Plugin: Wordpress NextGen Gallery) How to show the gallery description in nextgen gallery view?(插件:Wordpress NextGen Gallery)如何在 nextgen 画廊视图中显示画廊描述?
【发布时间】:2019-08-18 13:34:30
【问题描述】:

我正在尝试调整 NextGen Gallery 插件,特别是文件 nextgen-gallery/view/gallery.php 以实现在查看画廊时显示画廊描述。

所以,在这个文件中,我添加了以下几行:

    ....
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?>
    <?php if (!empty ($gallery)) : ?>

    <?php /** Lots of stuff added here by Mpampirina  **/ ?>
    <p> You are here: <a class="Link" href="<?php echo get_permalink(); ?>">
        <?php the_title(); ?></a> &gt;
        <?php $album = nggdb::find_album( get_query_var('album') ); ?> 
        <?php echo $album->name ?> &gt; <?php echo $gallery->title ?>
    </p>

    <div class="ngg-description">
        <p>Here I want to add the gallery description text. So I try with: 
            <?php echo $gallery->gallerydesc ?> . Also I try with: 
            <?php echo $gallery->galdesc ?> . 
            I get no description, whatsoever...
        </p> 
    </div>
    <?php /** End of stuff added by Mpampirina **/ ?>
     
    <div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
    ...

这是输出:

画廊描述当然不是空的。在“管理图库”菜单中添加了文本:

那么,有没有人可以看到我做错了什么,或者可能会指出我可能错过的另一个问题页面?这将非常有帮助! :-) 提前谢谢你

【问题讨论】:

  • 我完全靠运气找到了解决方案,它就在我眼前。 &lt;?php echo $gallery-&gt;description ?&gt;。就这么简单:S

标签: wordpress plugins nextgen-gallery galleryview


【解决方案1】:

我刚刚处理了同样的问题...

$gallery->description

【讨论】:

  • 应该更深入地阅读...没有看到您已经找到解决方案...抱歉!
猜你喜欢
  • 1970-01-01
  • 2014-07-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多