我有一段时间的问题,我找不到正确的解决方案。很多解决方案都很陈旧,在我的情况下行不通。
我有一个安装了nextgen图库插件的wordpress网站。现在,我想在画廊页面的顶部显示画廊名称。
我在其他页面上使用的一个选项是:$gallery->title
但这不管用。
我的网站是here,画廊是here
我正在处理的文件位于以下路径(index.php)中: /plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails
谢谢你的帮助!
发布于 2014-06-12 11:28:06
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>';
?>https://stackoverflow.com/questions/22451342
复制相似问题