0

我有一段时间有问题,但我找不到正确的解决方案。很多解决方案都是旧的,在我的情况下不起作用。

我有一个安装了 nextgen 画廊插件的 wordpress 网站。现在我想在画廊页面的顶部显示画廊名称。

我在其他页面上使用的一个选项是:$gallery->title

但这行不通。

我的网站在这里,画廊在这里

我正在工作的文件位于此路径(index.php)中:/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails

谢谢您的帮助!

4

1 回答 1

1

http://wordpress.org/support/topic/is-it-possible-to-display-title-on-gallery-page

感谢上帝给了很棒的人!(k33f)

 <?php
 // This develish little snippet is responsible for displaying the Gallery title when viewing a gallery thumbnail page
 global $wpdb;
 $gal_id = $displayed_gallery->container_ids;
 $myrow = $wpdb->get_row("SELECT * FROM wp_ngg_gallery WHERE gid = $gal_id[0]");
 echo '<h1 style="padding-bottom: 20px;">' . $myrow->title . '</h1>';
 ?>
于 2014-06-12T03:28:06.283 回答