title: Show WordPress gallery on home like a post with easy FancyBOX
body: <p>I try to show an WordPress Gallery on home page, but with the same effect present in a post page. Basically is show the gallery post on homepage when you clicking a post-thumb. I explain the problem: </p>
  
  <p>When I click on post_thumb, show in the home I like this show me, a Gallery attatch in this post. This my code:</p>
  
  <pre><code>                &lt;ul id="rb-grid" class="list rb-grid"&gt;
  
              &lt;?php $number = 0; query_posts('category_name=atracciones-home'); if(have_posts()): ?&gt;
                  &lt;?php while(have_posts()): the_post(); ?&gt;
                      &lt;li&gt;
                      &lt;!-- &lt;a data-fancybox-group="gallery" class="item fancybox" href="&lt;?php the_permalink(); ?&gt;"&gt; --&gt;
                      &lt;a data-fancybox-group="gallery" class="item fancybox iframe" href="&lt;?php get_attachment_link(); ?&gt;"&gt;
  
  
                              &lt;?php
                                  if ( has_post_thumbnail() )
                                      the_post_thumbnail('home-atracciones');
                                  else
                              echo '&lt;img src="' . trailingslashit( get_template_directory_uri() ) . 'img/default-thumbnail.png' . '" alt="" /&gt;';
                              ?&gt;
  
  
  
                              &lt;div class="over" id="gallery-atracciones"&gt;
                                  &lt;h2 class="page-title" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;span class="border"&gt;&lt;/span&gt;&lt;/h2&gt;                     
                              &lt;/div&gt;
  
  
  
  
                          &lt;/a&gt;
                      &lt;/li&gt;
                  &lt;?php endwhile; ?&gt;
              &lt;?php endif; wp_reset_query(); ?&gt;
              &lt;/ul&gt;
  </code></pre>