<?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: Automatically generate a content table in WordPress</title> <atom:link href="http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html/feed" rel="self" type="application/rss+xml" /><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html</link> <description>All the best Premium WordPress themes available online</description> <lastBuildDate>Sun, 24 Jul 2011 14:44:21 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: admin</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-456</link> <dc:creator>admin</dc:creator> <pubDate>Fri, 05 Mar 2010 11:05:19 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-456</guid> <description>Thanks for your comment Amanda and great job on getting it working in the sidebar! That&#039;s something I was thinking about but never got the time to get around it, thanks a lot.</description> <content:encoded><![CDATA[<p>Thanks for your comment Amanda and great job on getting it working in the sidebar! That&#8217;s something I was thinking about but never got the time to get around it, thanks a lot.</p> ]]></content:encoded> </item> <item><title>By: Amanda</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-455</link> <dc:creator>Amanda</dc:creator> <pubDate>Wed, 03 Mar 2010 23:14:58 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-455</guid> <description>Almost forgot: Thank you very much for this, by the way!</description> <content:encoded><![CDATA[<p>Almost forgot: Thank you very much for this, by the way!</p> ]]></content:encoded> </item> <item><title>By: Amanda</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-454</link> <dc:creator>Amanda</dc:creator> <pubDate>Wed, 03 Mar 2010 23:13:40 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-454</guid> <description>Nevermind, I was able to piece something together by modifying this a bit and using the shortcode in a text widget.What I ended up with is a bit specific to my site, and I&#039;m sure there&#039;s a better way to go about it, but here it is if someone wants to play with it: http://pastie.org/852611I&#039;m going to always use h3&#039;s, so I removed the need for the &quot;tag&quot; attribute (so the shortcode is just [content_table]), and since it&#039;s in the sidebar, I&#039;ll never need to divide it in half, so I removed that bit too, along with some slight markup changes, etc.</description> <content:encoded><![CDATA[<p>Nevermind, I was able to piece something together by modifying this a bit and using the shortcode in a text widget.</p><p>What I ended up with is a bit specific to my site, and I&#8217;m sure there&#8217;s a better way to go about it, but here it is if someone wants to play with it:<br /> <a href="http://pastie.org/852611" rel="nofollow">http://pastie.org/852611</a></p><p>I&#8217;m going to always use h3&#8242;s, so I removed the need for the &#8220;tag&#8221; attribute (so the shortcode is just [content_table]), and since it&#8217;s in the sidebar, I&#8217;ll never need to divide it in half, so I removed that bit too, along with some slight markup changes, etc.</p> ]]></content:encoded> </item> <item><title>By: Amanda</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-453</link> <dc:creator>Amanda</dc:creator> <pubDate>Wed, 03 Mar 2010 18:20:06 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-453</guid> <description>Is there a way to do this outside of the loop? For example, to put the contents table in the sidebar?</description> <content:encoded><![CDATA[<p>Is there a way to do this outside of the loop? For example, to put the contents table in the sidebar?</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-277</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Wed, 14 Oct 2009 08:46:06 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-277</guid> <description>After I used the code you sent me via email it works perfectly. Thanks so much for that.</description> <content:encoded><![CDATA[<p>After I used the code you sent me via email it works perfectly. Thanks so much for that.</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-276</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Wed, 14 Oct 2009 06:05:40 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-276</guid> <description>p tags where stripped out again...</description> <content:encoded><![CDATA[<p>p tags where stripped out again&#8230;</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-275</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Wed, 14 Oct 2009 06:04:57 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-275</guid> <description>Sorry but it still doesn´t work. My shortcode IS between  tags but they where stripped out in my last comment.The &quot;echo&quot; doesn´t seem to work but I´m not so much a PHP guy and not sure where exactly to put it.Maybe something went wrong when I copy&amp;paste  the code for the functions file. Is it possible you send it to me via email in a txt file?</description> <content:encoded><![CDATA[<p>Sorry but it still doesn´t work. My shortcode IS between  tags but they where stripped out in my last comment.</p><p>The &#8220;echo&#8221; doesn´t seem to work but I´m not so much a PHP guy and not sure where exactly to put it.</p><p>Maybe something went wrong when I copy&amp;paste  the code for the functions file. Is it possible you send it to me via email in a txt file?</p> ]]></content:encoded> </item> <item><title>By: admin</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-274</link> <dc:creator>admin</dc:creator> <pubDate>Tue, 13 Oct 2009 19:26:37 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-274</guid> <description>If there is no p tags around the shortcode then try to change the line &lt;code&gt;$content = str_replace(&#039;&lt;p&gt;&#039;.$m[0].&#039;&lt;/p&gt;&#039;, $content_table, $content);&lt;/code&gt;by&lt;code&gt;$content = str_replace($m[0], $content_table, $content);&lt;/code&gt;By echo I meant using the echo function in php to print out some variable like $content_table before doing the replace. Just to double check that the function acually works.</description> <content:encoded><![CDATA[<p>If there is no p tags around the shortcode then try to change the line <code>$content = str_replace('&lt;p&gt;'.$m[0].'&lt;/p&gt;', $content_table, $content);</code></p><p>by</p><p><code>$content = str_replace($m[0], $content_table, $content);</code></p><p>By echo I meant using the echo function in php to print out some variable like $content_table before doing the replace. Just to double check that the function acually works.</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-272</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Tue, 13 Oct 2009 18:05:25 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-272</guid> <description>A look into the source shows:[content_table tag=&quot;h3&quot;]what do you mean &quot;echo at various stages...&quot;?</description> <content:encoded><![CDATA[<p>A look into the source shows:</p><p>[content_table tag="h3"]</p><p>what do you mean &#8220;echo at various stages&#8230;&#8221;?</p> ]]></content:encoded> </item> <item><title>By: admin</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-271</link> <dc:creator>admin</dc:creator> <pubDate>Tue, 13 Oct 2009 17:56:17 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-271</guid> <description>Ok let&#039;s try something else. Is you shortcode between p tags? The function only replaces the string &lt;code&gt;&lt;p&gt;[content_table tag=&quot;xx&quot;]&lt;/p&gt;&lt;/code&gt;. (check spaces as well)If still no luck try to echo at various stage of the function to see where it fails.</description> <content:encoded><![CDATA[<p>Ok let&#8217;s try something else. Is you shortcode between p tags? The function only replaces the string <code>&lt;p&gt;[content_table tag="xx"]&lt;/p&gt;</code>. (check spaces as well)</p><p>If still no luck try to echo at various stage of the function to see where it fails.</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-270</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Tue, 13 Oct 2009 16:40:57 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-270</guid> <description>Unfortunately still the same. Now it appears as plain text WITH double quotes. Also tried single quotes...doesn´t work :-(</description> <content:encoded><![CDATA[<p>Unfortunately still the same. Now it appears as plain text WITH double quotes. Also tried single quotes&#8230;doesn´t work :-(</p> ]]></content:encoded> </item> <item><title>By: admin</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-269</link> <dc:creator>admin</dc:creator> <pubDate>Tue, 13 Oct 2009 13:14:49 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-269</guid> <description>That&#039;s my bad, you have to enclose the tag in double quotes. So the shortcode should look like: [content_table tag=&quot;h3&quot;] in your case.I&#039;ve corrected that in the article as well.</description> <content:encoded><![CDATA[<p>That&#8217;s my bad, you have to enclose the tag in double quotes. So the shortcode should look like: [content_table tag="h3"] in your case.</p><p>I&#8217;ve corrected that in the article as well.</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-265</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Mon, 12 Oct 2009 15:49:10 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-265</guid> <description>Needed to set some backslashes in front of some doublequotes and now the error is gone. I´m Running PHP 5.But it still does not wor properly. When I type in[content_table tag=h3]in order to get the h3 headings in a list the output is just the shortcode as plain text. D I make any mistake?</description> <content:encoded><![CDATA[<p>Needed to set some backslashes in front of some doublequotes and now the error is gone. I´m Running PHP 5.</p><p>But it still does not wor properly. When I type in</p><p>[content_table tag=h3]</p><p>in order to get the h3 headings in a list the output is just the shortcode as plain text. D I make any mistake?</p> ]]></content:encoded> </item> <item><title>By: admin</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-264</link> <dc:creator>admin</dc:creator> <pubDate>Mon, 12 Oct 2009 14:46:36 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-264</guid> <description>Works for me when I tried you line of code for the &#039;back to top&#039; bit. Could be a problem with php. Some  early versions (before 4.0.4) do not allow you to use the $n in the second parameter of preg_replace.</description> <content:encoded><![CDATA[<p>Works for me when I tried you line of code for the &#8216;back to top&#8217; bit. Could be a problem with php. Some  early versions (before 4.0.4) do not allow you to use the $n in the second parameter of preg_replace.</p> ]]></content:encoded> </item> <item><title>By: Michael Oeser</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-263</link> <dc:creator>Michael Oeser</dc:creator> <pubDate>Mon, 12 Oct 2009 12:37:21 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-263</guid> <description>Cool stuff but i get an error:Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /PATH-TO-FILE/functions.php on line 190In line 190 is the part for the &quot;back to top&quot; links:&lt;code&gt;$content = preg_replace(&quot;&#124;(.*)&#124;e&quot;, &quot;&#039;&#039;.ucfirst(&#039;$1&#039;).&#039;&lt;a&gt;Back to top&lt;/a&gt;&#039;&quot;, $content);&lt;/code&gt;Any idea what´s happened?</description> <content:encoded><![CDATA[<p>Cool stuff but i get an error:</p><p>Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /PATH-TO-FILE/functions.php on line 190</p><p>In line 190 is the part for the &#8220;back to top&#8221; links:</p><p><code>$content = preg_replace("|(.*)|e", "''.ucfirst('$1').'<a>Back to top</a>'", $content);</code></p><p>Any idea what´s happened?</p> ]]></content:encoded> </item> <item><title>By: Automatically Generate A Content Table In WordPress &#124; Design Newz</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-260</link> <dc:creator>Automatically Generate A Content Table In WordPress &#124; Design Newz</dc:creator> <pubDate>Sat, 10 Oct 2009 22:01:46 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-260</guid> <description>[...] Automatically Generate A Content Table In WordPress [...]</description> <content:encoded><![CDATA[<p>[...] Automatically Generate A Content Table In WordPress [...]</p> ]]></content:encoded> </item> <item><title>By: Automatically generate a content table in WordPress &#124; Wordpress Themes Collection</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-255</link> <dc:creator>Automatically generate a content table in WordPress &#124; Wordpress Themes Collection</dc:creator> <pubDate>Fri, 09 Oct 2009 08:13:33 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-255</guid> <description>[...] the original post: Automatically generate a content table in WordPress &#124; Wordpress Themes Collection             Comments0  Leave a Reply  Click here to cancel [...]</description> <content:encoded><![CDATA[<p>[...] the original post: Automatically generate a content table in WordPress | WordPress Themes Collection             Comments0  Leave a Reply  Click here to cancel [...]</p> ]]></content:encoded> </item> <item><title>By: Automaticly generate a content table in WordPress</title><link>http://wordpressthemescollection.com/automaticly-generate-a-content-table-in-wordpress-349.html#comment-252</link> <dc:creator>Automaticly generate a content table in WordPress</dc:creator> <pubDate>Thu, 08 Oct 2009 18:00:46 +0000</pubDate> <guid isPermaLink="false">http://wordpressthemescollection.com/?p=349#comment-252</guid> <description>[...] Visit Source. [...]</description> <content:encoded><![CDATA[<p>[...] Visit Source. [...]</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 1/4 queries in 0.001 seconds using disk
Object Caching 475/478 objects using disk

Served from: wordpressthemescollection.com @ 2012-02-04 20:50:32 -->
