- fleacircus March 1, 2013 at 8:30 am
I understand how to use the Gallery but it simply doesn’t work. I’ve confirmed the media is attached to the gallery page and the page is using the correct template. I have set the cache permissions to 777.
I still get “There are no images for this gallery”.
I’m running WordPress 3.5.1 with no plugins or significant customizations. Enabling debug for WordPress shows no errors.
fleacircus March 1, 2013 at 8:47 amDumping the contents of the $attachment array gives:
Array ( [114] => WP_Post Object ( [ID] => 114 [post_author] => 1 [post_date] => 2013-03-01 19:42:35 [post_date_gmt] => 2013-03-01 08:42:35 [post_content] => [post_title] => gallery-test [post_excerpt] => [post_status] => inherit [comment_status] => open [ping_status] => open [post_password] => [post_name] => gallery-test [to_ping] => [pinged] => [post_modified] => 2013-03-01 19:42:35 [post_modified_gmt] => 2013-03-01 08:42:35 [post_content_filtered] => [post_parent] => 109 [guid] => http://brotheralec.com/wp-content/uploads/2013/03/gallery-test.png [menu_order] => 0 [post_type] => attachment [post_mime_type] => image/png [comment_count] => 0 [filter] => raw ) )
There are no images for this gallery
fleacircus March 1, 2013 at 8:51 amUgh, nevermind. I just noticed the line
if ( !empty( $attachments ) && ( count( $attachments ) > 1 ) ) {
It works if I add more than 1 image to the gallery.
Juanfra Aldasoro March 1, 2013 at 1:47 pmHello there,
Thanks for writing.
It seems you’ve found the solution 🙂 – you’re right, galleries are shown when having more than one image.
Have a nice day,
Juan.
This topic is marked as resolved
Only the topic author can re-open this thread.