<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to Render Your Own WordPress Photo Gallery	</title>
	<atom:link href="https://www.shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/feed" rel="self" type="application/rss+xml" />
	<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery</link>
	<description>Adventures in WordPress</description>
	<lastBuildDate>Wed, 17 Feb 2016 20:21:29 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9</generator>
	<item>
		<title>
		By: A		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-876369</link>

		<dc:creator><![CDATA[A]]></dc:creator>
		<pubDate>Wed, 17 Feb 2016 20:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-876369</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-205486&quot;&gt;Dave McCourt&lt;/a&gt;.

Thanks for this approach. You could also use output buffering (ob_start, ob_get_contents) to get the output without changing much of the code.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-205486">Dave McCourt</a>.</p>
<p>Thanks for this approach. You could also use output buffering (ob_start, ob_get_contents) to get the output without changing much of the code.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bart McLeod		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-864347</link>

		<dc:creator><![CDATA[Bart McLeod]]></dc:creator>
		<pubDate>Fri, 06 Nov 2015 16:08:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-864347</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-864345&quot;&gt;Bart McLeod&lt;/a&gt;.

Well actually, the &#039;include&#039; index is present, but the value is empty.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-864345">Bart McLeod</a>.</p>
<p>Well actually, the &#8216;include&#8217; index is present, but the value is empty.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Bart McLeod		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-864345</link>

		<dc:creator><![CDATA[Bart McLeod]]></dc:creator>
		<pubDate>Fri, 06 Nov 2015 16:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-864345</guid>

					<description><![CDATA[Thanks for your post! I needed to know what to do if no &#039;include&#039; index is present when loading the images and your example makes it quite clear.]]></description>
			<content:encoded><![CDATA[<p>Thanks for your post! I needed to know what to do if no &#8216;include&#8217; index is present when loading the images and your example makes it quite clear.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dave McCourt		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-205486</link>

		<dc:creator><![CDATA[Dave McCourt]]></dc:creator>
		<pubDate>Sun, 27 Jul 2014 14:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-205486</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-130202&quot;&gt;ket&lt;/a&gt;.

Ket, if you return the output and the use the_content() filter, it works inline (ie wherever you put your gallery in the post editor): 

&lt;code&gt;
remove_shortcode(&#039;gallery&#039;);
add_shortcode(&#039;gallery&#039;, &#039;parse_gallery_shortcode&#039;);

function gallery_output_in_the_content($content) {
	$g = parse_gallery_shortcode();
	$custom_content = $g;
	$custom_content .= $content;
	return $custom_content;
}

add_filter(&#039;the_content&#039;, &#039;gallery_output_in_the_content&#039;);

function parse_gallery_shortcode($atts) {
… as above but with this extra code:

   $gal .= &#039;&#039;;

   foreach ($images as $image) {     
        $caption = $image-&#062;post_excerpt;
 
        $description = $image-&#062;post_content;
        if($description == &#039;&#039;) $description = $image-&#062;post_title;
 
        $image_alt = get_post_meta($image-&#062;ID,&#039;_wp_attachment_image_alt&#039;, true);
 
        // render your gallery here
        $gal .=  &#039;&#039;;
        $img_meta = wp_get_attachment_metadata($image-&#062;ID);
        $img = wp_get_attachment_image_src($image-&#062;ID, &#039;gallery-small&#039;);
        $img_big = wp_get_attachment_image_src($image-&#062;ID, &#039;gallery-big&#039;);
        $gal .=  &#039;&lt;a href=&quot;&#039; . $img_big[0] . &#039;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;&#039;;
        if (strlen($caption) &#062; 0) $gal .= &#039;&#039; . $caption . &#039;&#039;;
        $gal .=  &#039;&#039;;
    }
    
    $gal .=  &#039;&#039;;
       
    return $gal;    
}
&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-130202">ket</a>.</p>
<p>Ket, if you return the output and the use the_content() filter, it works inline (ie wherever you put your gallery in the post editor): </p>
<p><code><br />
remove_shortcode('gallery');<br />
add_shortcode('gallery', 'parse_gallery_shortcode');</p>
<p>function gallery_output_in_the_content($content) {<br />
	$g = parse_gallery_shortcode();<br />
	$custom_content = $g;<br />
	$custom_content .= $content;<br />
	return $custom_content;<br />
}</p>
<p>add_filter('the_content', 'gallery_output_in_the_content');</p>
<p>function parse_gallery_shortcode($atts) {<br />
… as above but with this extra code:</p>
<p>   $gal .= '';</p>
<p>   foreach ($images as $image) {<br />
        $caption = $image-&gt;post_excerpt;</p>
<p>        $description = $image-&gt;post_content;<br />
        if($description == '') $description = $image-&gt;post_title;</p>
<p>        $image_alt = get_post_meta($image-&gt;ID,'_wp_attachment_image_alt', true);</p>
<p>        // render your gallery here<br />
        $gal .=  '';<br />
        $img_meta = wp_get_attachment_metadata($image-&gt;ID);<br />
        $img = wp_get_attachment_image_src($image-&gt;ID, 'gallery-small');<br />
        $img_big = wp_get_attachment_image_src($image-&gt;ID, 'gallery-big');<br />
        $gal .=  '<a href="' . $img_big[0] . '" rel="nofollow"></a>';<br />
        if (strlen($caption) &gt; 0) $gal .= '' . $caption . '';<br />
        $gal .=  '';<br />
    }</p>
<p>    $gal .=  '';</p>
<p>    return $gal;<br />
}<br />
</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ket		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-130202</link>

		<dc:creator><![CDATA[ket]]></dc:creator>
		<pubDate>Sun, 25 May 2014 13:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-130202</guid>

					<description><![CDATA[This code pushes text down to below the gallery. How to show gallery below or between text content.]]></description>
			<content:encoded><![CDATA[<p>This code pushes text down to below the gallery. How to show gallery below or between text content.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Leon		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-95587</link>

		<dc:creator><![CDATA[Leon]]></dc:creator>
		<pubDate>Wed, 19 Mar 2014 17:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-95587</guid>

					<description><![CDATA[This example been extremely helpful, thank you!]]></description>
			<content:encoded><![CDATA[<p>This example been extremely helpful, thank you!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jimmy		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-91339</link>

		<dc:creator><![CDATA[Jimmy]]></dc:creator>
		<pubDate>Sun, 24 Nov 2013 02:16:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-91339</guid>

					<description><![CDATA[Hi there,



trying to display the gallery - as in the kin theme. 


i am using wordpress 3.7 


I created the plugin and added the first bit 

then i added the second bit got errors
so i tried to add it to my functions file got the same error 

tried to paste it into the page template not working there 


any help would be great]]></description>
			<content:encoded><![CDATA[<p>Hi there,</p>
<p>trying to display the gallery &#8211; as in the kin theme. </p>
<p>i am using wordpress 3.7 </p>
<p>I created the plugin and added the first bit </p>
<p>then i added the second bit got errors<br />
so i tried to add it to my functions file got the same error </p>
<p>tried to paste it into the page template not working there </p>
<p>any help would be great</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Elliot		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-2#comment-88170</link>

		<dc:creator><![CDATA[Elliot]]></dc:creator>
		<pubDate>Fri, 08 Nov 2013 13:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-88170</guid>

					<description><![CDATA[This looks like a great solution, but when I activate the plugin, all the images in the editor&#039;s Media popup disappear.  Any idea why this might be happening?]]></description>
			<content:encoded><![CDATA[<p>This looks like a great solution, but when I activate the plugin, all the images in the editor&#8217;s Media popup disappear.  Any idea why this might be happening?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ShibaShake		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-1#comment-85534</link>

		<dc:creator><![CDATA[ShibaShake]]></dc:creator>
		<pubDate>Sat, 19 Oct 2013 04:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-85534</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-1#comment-85525&quot;&gt;Nicholas&lt;/a&gt;.

This is an older article, written before the 3.5 update where individual image ids are specified, rather than using the parent-attach system. Refer to http://codex.wordpress.org/Gallery_Shortcode for a summary of shortcode history and the old vs. new media flow.

&lt;strong&gt;ADD:&lt;/strong&gt; I have just updated the article above to handle id lists.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-1#comment-85525">Nicholas</a>.</p>
<p>This is an older article, written before the 3.5 update where individual image ids are specified, rather than using the parent-attach system. Refer to <a href="http://codex.wordpress.org/Gallery_Shortcode" rel="nofollow ugc">http://codex.wordpress.org/Gallery_Shortcode</a> for a summary of shortcode history and the old vs. new media flow.</p>
<p><strong>ADD:</strong> I have just updated the article above to handle id lists.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nicholas		</title>
		<link>https://shibashake.com/wp/how-to-render-your-own-wordpress-photo-gallery/comment-page-1#comment-85525</link>

		<dc:creator><![CDATA[Nicholas]]></dc:creator>
		<pubDate>Sat, 19 Oct 2013 02:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.shibashake.com/wordpress-theme/?p=3011#comment-85525</guid>

					<description><![CDATA[Hey I don&#039;t mean to criticize but your code is really not doing the right thing. Firstly as some other comments shared, you are pulling all attachments inside the post, not just from that gallery. The other problem with doing this is the function will no longer respects the order by which the images were set up in the gallery; it is passed as $atts to the shortcode function but disregarded completely.]]></description>
			<content:encoded><![CDATA[<p>Hey I don&#8217;t mean to criticize but your code is really not doing the right thing. Firstly as some other comments shared, you are pulling all attachments inside the post, not just from that gallery. The other problem with doing this is the function will no longer respects the order by which the images were set up in the gallery; it is passed as $atts to the shortcode function but disregarded completely.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 10/23 objects using disk
Page Caching using disk: enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: cdn.shibashake.com
Lazy Loading (feed)
Minified using disk
Database Caching 2/27 queries in 0.016 seconds using disk (Request-wide modification query)

Served from: www.shibashake.com @ 2024-12-14 22:15:30 by W3 Total Cache
-->