<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Masonry style lightbox gallery using either Block Grid or standard columns &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/feed/</link>
		<description></description>
		<lastBuildDate>Sun, 12 Oct 2025 13:18:29 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-125529</guid>
					<title><![CDATA[Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-125529</link>
					<pubDate>Wed, 15 Oct 2014 09:34:37 +0000</pubDate>
					<dc:creator>Bryan C</dc:creator>

					<description>
						<![CDATA[
						<p>Hello,</p>
<p>I&#8217;m looking for some help with creating a portfolio style gallery that has a masonry look and works with a lightbox.<br />
at my test site of <a href="http://bryancooperphoto.com/people-lightbox-test/" rel="nofollow">http://bryancooperphoto.com/people-lightbox-test/</a> I have created one area at the top using standard images with the visual composer backend and a 3 column layout and activated them to act with the responsive lightbox. It looks alright (though I would like to make the margins between images smaller) but the lightbox scrolls through the images top to bottom based on the columns instead of left to right like one would expect. What can I do to achieve this masonry style but with lightbox functioning from left to right?</p>
<p>I tried in the section below using the block grid method to create this effect, but once it gets to the second row the image has a large gap, because of the sizing of the middle row. I want a gallery that uses the full aspect ratio and doesn&#8217;t crop and this seems to be the problem with using the block grid.</p>
<p>Ideally the typical portfolio page would have the option of opening as a lightbox instead of only linking to a separate page as I really like the style and the ability to filter, but I know you don&#8217;t have that feature built-in and I have no idea where to start custom coding something like that. I&#8217;m a somewhat experienced experimenter when it comes to things wordpress, but that&#8217;s way out of my breadth. I have been finding the learning curve for X Theme a lot more steep than any other themes I&#8217;ve used in the past. If you had any advice on where to start I&#8217;d be interested in hearing. I&#8217;ve searched throughout the knowledge bases and forums hoping to find any other case where someone undertook the portfolio being a lightbox feature, but there is nothing I could see. </p>
<p>Thanks for any and all help.</p>
<p>-Bryan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-125806</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-125806</link>
					<pubDate>Wed, 15 Oct 2014 16:38:04 +0000</pubDate>
					<dc:creator>Cousett</dc:creator>

					<description>
						<![CDATA[
						<p>I just wanted to check have you looked at using the built in portfolio feature of X? The integrity demo shows how this would look <a href="http://theme.co/x/demo/integrity/1/portfolio/" rel="nofollow">http://theme.co/x/demo/integrity/1/portfolio/</a> I think then modifying the template file for integrity so that it opens in a lightbox instead of the full link to another page. Let us know what you think of this solution. </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126150</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126150</link>
					<pubDate>Thu, 16 Oct 2014 06:47:08 +0000</pubDate>
					<dc:creator>Bryan C</dc:creator>

					<description>
						<![CDATA[
						<p>I would definitely like to use the built-in portfolio feature, but would it be simple to modify the template file so that it opens in lightbox? If you could provide some direction and help with doing so then that would be my solution.</p>
<p>I&#8217;m using the icon theme btw, I am currently working off an icon child theme (installed it thinking that I might be able to modify some of the code, but I don&#8217;t know where to start)</p>
<p>Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126424</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126424</link>
					<pubDate>Thu, 16 Oct 2014 15:18:18 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Bryan,</p>
<p>You can make the porfolio item open in lightbox by following the steps below.</p>
<p>1. Add code below in child theme&#8217;s functions.php</p>
<pre><code>
if ( ! function_exists( &#039;x_featured_image&#039; ) ) :
  function x_featured_image( $cropped = &#039;&#039; ) {

    $stack     = x_get_stack();
    $fullwidth = ( in_array( &#039;x-full-width-active&#039;, get_body_class() ) ) ? true : false;

    if ( has_post_thumbnail() ) {

      if ( $cropped == &#039;cropped&#039; ) {
        if ( $fullwidth ) {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack . &#039;-cropped-fullwidth&#039;, NULL );
        } else {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack . &#039;-cropped&#039;, NULL );
        }
      } else {
        if ( $fullwidth ) {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack . &#039;-fullwidth&#039;, NULL );
        } else {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack, NULL );
        }
      }

      $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&gt;ID ), &#039;large&#039; );
      
      switch ( is_singular() ) {
        case true:
          printf( &#039;&lt;div class=&quot;entry-thumb&quot;&gt;%s&lt;/div&gt;&#039;, $thumb );
          break;
        case false:
          
          printf( &#039;&lt;a href=&quot;%1$s&quot; class=&quot;entry-thumb x-portfolio-lightbox&quot; title=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;&#039;,
            $large_image_url[0],
            esc_attr( sprintf( __( &#039;Permalink to: &quot;%s&quot;&#039;, &#039;__x__&#039; ), the_title_attribute( &#039;echo=0&#039; ) ) ),
            $thumb
          );

          break;
      }
      
      

    }

  }
endif;

function my_custom_footer_output() {
  ?&gt;
   &lt;script type=&#039;text/javascript&#039; src=&#039;http://bryancooperphoto.com/wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.js&#039;&gt;&lt;/script&gt;
  &lt;?php
}

add_action( &#039;wp_footer&#039;, &#039;my_custom_footer_output&#039;, 99999 );
</code></pre>
<p>2. Then You can add this under <strong>Custom &gt; Javascripts</strong> in the <strong>Customizer</strong>.</p>
<pre><code>
jQuery(document).ready(function(){
    jQuery(&#039;a.entry-thumb.x-portfolio-lightbox&#039;).iLightBox({skin: &#039;light&#039;,overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: &#039;horizontal&#039;,controls: {thumbnail: false}})

});
</code></pre>
<p>Hope that helps</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126431</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126431</link>
					<pubDate>Thu, 16 Oct 2014 15:28:21 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Bryan,</p>
<p>Thank you for writing in!</p>
<p>To open the portfolio items in a lightbox, you can follow this customization: <a href="http://theme.co/x/member/forums/topic/make-portfolio-items-work-like-a-lightbox-gallery/#post-111428" rel="nofollow">http://theme.co/x/member/forums/topic/make-portfolio-items-work-like-a-lightbox-gallery/#post-111428</a></p>
<p>Hope this helps. 🙂</p>
<p>Thank you.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126525</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126525</link>
					<pubDate>Thu, 16 Oct 2014 17:54:59 +0000</pubDate>
					<dc:creator>Bryan C</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks, that was exactly what I was looking for! </p>
<p>As a bonus is there any way to insert caption material that would show up in the lightbox like you can with the regular image in a lightbox shortcode? I&#8217;m guessing with some adjustment to the code you sent me I can even source data from the portfolio items.<br />
Either that or a button you see on hovering that leads to more info like linking to a blog post or the portfolio item. </p>
<p>Thanks so much, you&#8217;ve already been such a help. You guys are awesome!</p>
<p>-Bryan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126710</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-126710</link>
					<pubDate>Thu, 16 Oct 2014 23:13:44 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Bryan,</p>
<p>Thanks for posting in.</p>
<p>Yes, those are possible with custom development. The idea is set the caption on portfolio link using javascript before the lightbox initialize. Or customize the template. Either way, you may need to consult a developer for further customization.</p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-178690</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-178690</link>
					<pubDate>Wed, 07 Jan 2015 20:39:43 +0000</pubDate>
					<dc:creator>Bryan C</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Support,</p>
<p>The previous fix you gave me has a bad side-effect whereby in the blog post masonry page found here: <a href="http://bryancooperphoto.com/recent/" rel="nofollow">http://bryancooperphoto.com/recent/</a></p>
<p>Any featured images would also pop up in a lightbox or be linked to the media page. Is there a way to make those featured images link to the post or not link to anything at all. I can&#8217;t find any spot to specify for only portfolio post items and not just any post items. Thanks for your help!</p>
<p>-Bryan</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-178946</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-178946</link>
					<pubDate>Thu, 08 Jan 2015 05:22:16 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Bryan,</p>
<p>You can replace the code in your child theme&#8217;s functinos.php file with this.</p>
<pre><code>
function x_featured_image( $cropped = &#039;&#039; ) {
  Global $post;
    $stack     = x_get_stack();
    $fullwidth = ( in_array( &#039;x-full-width-active&#039;, get_body_class() ) ) ? true : false;

    if ( has_post_thumbnail() ) {

      if ( $cropped == &#039;cropped&#039; ) {
        if ( $fullwidth ) {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack . &#039;-cropped-fullwidth&#039;, NULL );
        } else {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack . &#039;-cropped&#039;, NULL );
        }
      } else {
        if ( $fullwidth ) {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack . &#039;-fullwidth&#039;, NULL );
        } else {
          $thumb = get_the_post_thumbnail( NULL, &#039;entry-&#039; . $stack, NULL );
        }
      }

      switch ( is_singular() ) {
        case true:
          printf( &#039;&lt;div class=&quot;entry-thumb&quot;&gt;%s&lt;/div&gt;&#039;, $thumb );
          break;
        case false:
          if(is_single()):
          printf( &#039;&lt;a href=&quot;%1$s&quot; class=&quot;entry-thumb&quot; title=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;&#039;,
            esc_url( get_permalink() ),
            esc_attr( sprintf( __( &#039;Permalink to: &quot;%s&quot;&#039;, &#039;__x__&#039; ), the_title_attribute( &#039;echo=0&#039; ) ) ),
            $thumb
          );
          else:
          printf( &#039;&lt;a href=&quot;%1$s&quot; class=&quot;entry-thumb&quot; title=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;&#039;,
            esc_url( wp_get_attachment_url( get_post_thumbnail_id($post-&gt;ID) ) ),
            esc_attr( sprintf( __( &#039;Permalink to: &quot;%s&quot;&#039;, &#039;__x__&#039; ), the_title_attribute( &#039;echo=0&#039; ) ) ),
            $thumb
          );
          endif;
          break;
      }

    }

  }

add_action(&#039;wp_footer&#039;, &#039;enqueue_lightbox_script&#039;);

function enqueue_lightbox_script() {

  echo &#039;

    &lt;script type=&quot;text/javascript&quot; src=&quot;&#039; . home_url() . &#039;/wp-content/plugins/x-shortcodes/js/dist/site/vendor-ilightbox.min.js&quot;&gt;&lt;/script&gt;
    &lt;script&gt;
    jQuery(document).ready(function(){jQuery(&quot;.entry-featured .entry-thumb&quot;).iLightBox({skin: &quot;light&quot;,linkId: &quot;gallery-image&quot;,overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: &quot;horizontal&quot;,controls: {thumbnail: false}});});
    &lt;/script&gt;

  &#039;;
}
</code></pre>
<p>Hope that helps.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-179371</guid>
					<title><![CDATA[Reply To: Masonry style lightbox gallery using either Block Grid or standard columns]]></title>
					<link>https://theme.co/archive/forums/topic/masonry-style-lightbox-gallery-using-either-block-grid-or-standard-columns/#post-179371</link>
					<pubDate>Thu, 08 Jan 2015 18:54:14 +0000</pubDate>
					<dc:creator>Bryan C</dc:creator>

					<description>
						<![CDATA[
						<p>Unfortunately I tried that on my test site and my real site that&#8217;s now being set up, and it didn&#8217;t yield any different of a result. Any idea why? Thanks for your time!</p>
<p>-Bryan</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

