A simple wordpress gallery that you can attach to a page? [closed]
Want to improve this question? Update the question so it's on-topic for Stack 开发者_开发问答Overflow.
Closed 11 years ago.
Improve this questionI was wondering if anyone knew of a good simple image gallery plugin for Wordpress, where you can attach a gallery to a Page and get those images on said Page.
All of the popular solutions for galleries in Wordpress seem to to be self-contained solutions with several unneeded bells and/or whistles.
So has any one used a good simple plugin where a page can just have some images.
Cheers.
I dont know such plugins, but I can suggest one solution for that.
<?php
if(is_page) {
global $post;
$images = get_children('post_type=attachment&post_mime_type=image&post_parent=' . $post->ID );
foreach($images as $image ) {
echo wp_get_attachment_image($image->ID);
}
}
?>
Above code return all attached images (from gallery) of current page.
Am I missing something, or do you just want the [gallery]
shortcode? (Add [gallery]
to the text of your post in the place you want the related images displayed...)
精彩评论