我正在创建一个博客,其中某个类别的帖子组成了图片库(使用标准的WP功能和修改后的single.php来显示图片库)
现在,我想在其他博客帖子中添加一些这些图库的链接。理想的方法是使用以下短代码
[thumbnails galleryid=209]
(或其他)显示209号帖子中可定义数量的缩略图和链接。有人知道一个现成的插件可以做到这一点吗?
我正在创建一个博客,其中某个类别的帖子组成了图片库(使用标准的WP功能和修改后的single.php来显示图片库)
现在,我想在其他博客帖子中添加一些这些图库的链接。理想的方法是使用以下短代码
[thumbnails galleryid=209]
(或其他)显示209号帖子中可定义数量的缩略图和链接。有人知道一个现成的插件可以做到这一点吗?
我不这么认为,但你可以get_children 并获取这些帖子的附件:
$attachments = get_children(array(
\'post_parent\' => $post->ID, // <- source post
\'post_status\' => \'inherit\',
\'post_type\' => \'attachment\',
\'post_mime_type\' => \'image\',
\'order\' => \'post_date\',
\'orderby\' => \'DESC\',
\'numberposts\' => 5, // the number
));
然后获取图像URL:$size = \'post-thumbnail\'; // or whatever size you need
foreach($attachments as $att){
list($source, $width, $height) = wp_get_attachment_image_src($att->ID, $size);
// echo \'<img src="\'.$source.\'" width="\'.$width.\'" height=\'".$height."\' />\';
}
Can you recommend a tutorial or a plugin in wordpress that lets you achieve a similar gallery, like this http://www.whitehouse.gov/photos-and-video/photogallery/may-2011-photo-dayLarge Preview then at the bottom a thumbnails then an album. I also like coo
我正在创建一个博客,其中某个类别的帖子组成了图片库(使用标准的WP功能和修改后的single.php来显示图片库)
现在,我想在其他博客帖子中添加一些这些图库的链接。理想的方法是使用以下短代码
[thumbnails galleryid=209]
(或其他)显示209号帖子中可定义数量的缩略图和链接。有人知道一个现成的插件可以做到这一点吗?
我不这么认为,但你可以get_children 并获取这些帖子的附件:
$attachments = get_children(array(
\'post_parent\' => $post->ID, // <- source post
\'post_status\' => \'inherit\',
\'post_type\' => \'attachment\',
\'post_mime_type\' => \'image\',
\'order\' => \'post_date\',
\'orderby\' => \'DESC\',
\'numberposts\' => 5, // the number
));
然后获取图像URL:$size = \'post-thumbnail\'; // or whatever size you need
foreach($attachments as $att){
list($source, $width, $height) = wp_get_attachment_image_src($att->ID, $size);
// echo \'<img src="\'.$source.\'" width="\'.$width.\'" height=\'".$height."\' />\';
}
我在Wordpress网站的管理视图中收到通知,我有一个网站和插件的可用更新(在我的网络管理仪表板中,在“插件”和“更新”旁边的红色圆圈中有“1”)。。。但当我尝试同时转到“更新”页和;插件页面,是否显示主页?此时的URL为http:///wp-admin/network/update-core.php/和http:///wp-admin/plugins.php/分别地因此,我永远无法到达真正的更新页面,也无法更新我的Wordpress或插件。如何显示更新或插件页面?
我正在创建一个博客,其中某个类别的帖子组成了图片库(使用标准的WP功能和修改后的single.php来显示图片库)
现在,我想在其他博客帖子中添加一些这些图库的链接。理想的方法是使用以下短代码
[thumbnails galleryid=209]
(或其他)显示209号帖子中可定义数量的缩略图和链接。有人知道一个现成的插件可以做到这一点吗?
我不这么认为,但你可以get_children 并获取这些帖子的附件:
$attachments = get_children(array(
\'post_parent\' => $post->ID, // <- source post
\'post_status\' => \'inherit\',
\'post_type\' => \'attachment\',
\'post_mime_type\' => \'image\',
\'order\' => \'post_date\',
\'orderby\' => \'DESC\',
\'numberposts\' => 5, // the number
));
然后获取图像URL:$size = \'post-thumbnail\'; // or whatever size you need
foreach($attachments as $att){
list($source, $width, $height) = wp_get_attachment_image_src($att->ID, $size);
// echo \'<img src="\'.$source.\'" width="\'.$width.\'" height=\'".$height."\' />\';
}
嗨,我是wordpress的新手,我尝试在主页上显示小图库(如服务),我希望他们将其链接到页面,而不是帖子。目前我正在研究这个主题。它有一个服务选项,但我无法将其与页面链接。我可以把它们和帖子联系起来。请推荐任何插件