<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Sorrowful Unfounded - Latest Comments in WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.disqus.com/</link><description>Personal Weblog of Christopher Clarke</description><atom:link href="https://sorrowfulunfounded.disqus.com/wordpress_tutorial_8211_table_of_contents_in_a_page/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 22 Aug 2010 06:44:43 -0000</lastBuildDate><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-70571220</link><description>&lt;p&gt;The code was not designed to do that. If it's just one page your using this on, it's probably easier to add the category names manually to the template given that I don't think that WordPress offers an easy way to pick and choose which category name to display other then those which the post is apart of.&lt;/p&gt;&lt;p&gt;If your talking about my WordPress Table of Contents widget instead, you need to set the category name manually for each widget instance.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Sun, 22 Aug 2010 06:44:43 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-70484891</link><description>&lt;p&gt;hi! i found this support page via google cache. it's 404 on your blog. &lt;br&gt;all works well, posting multiple categories in the same page and i'm happy :) the title for each category does not show, can you please tell me how to add the title of the category to the template?&lt;br&gt;merci!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">myriam</dc:creator><pubDate>Sat, 21 Aug 2010 14:01:01 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-60098643</link><description>&lt;p&gt;Fixed. :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Thu, 01 Jul 2010 01:03:16 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-59964009</link><description>&lt;p&gt;I'll fix them by tomorrow afternoon. Busy at the moment.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Wed, 30 Jun 2010 05:05:15 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-59962398</link><description>&lt;p&gt;The attributes and custom fileds images are broken... shame I was looking for this exact feature &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dave</dc:creator><pubDate>Wed, 30 Jun 2010 04:41:00 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-21147028</link><description>&lt;p&gt;Sir, you saved my backside.  Changing the code like you mention fixes it for pages, but you do have to get a plugin to allow you to assign categories to your pages.  With those two (plugin + your hack) I have now got index pages for a specific sub category.&lt;/p&gt;&lt;p&gt;Oh, the plugin I used so that others can use it is located here:  &lt;a href="http://www.megaupload.com/?d=CLBDY6U0" rel="nofollow noopener" target="_blank" title="http://www.megaupload.com/?d=CLBDY6U0"&gt;http://www.megaupload.com/?...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I downloaded that, implemented it, created categories, assigned them to pages and then, with that code change:  &lt;a href="http://davensjournal.com/Updating/beginning-wicca" rel="nofollow noopener" target="_blank" title="http://davensjournal.com/Updating/beginning-wicca"&gt;http://davensjournal.com/Up...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I'm VERY happy now.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daven</dc:creator><pubDate>Tue, 27 Oct 2009 20:50:51 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-21143143</link><description>&lt;p&gt;The plugin and table of contents described in this tutorial doesn't support pages.&lt;/p&gt;&lt;p&gt;I haven't tested but I think replacing $toc = get_post... with $toc = get_pages('child_of='.$post-&amp;gt;ID.'&amp;amp;sort_column=post_date&amp;amp;sort_order=ASC'); should do the trick. Of course, replace '.$post-&amp;gt;ID.' with the ID of the page that is the parent of the chapters you want to list if it isn't the page that holds the parent (even so you might still need to replace it, I don't know).&lt;/p&gt;&lt;p&gt;Good luck.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Tue, 27 Oct 2009 19:32:27 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-21116008</link><description>&lt;p&gt;Okay, I finally got a plugin that allows me to assign categories to my pages, and while the plugin is working for POSTS, it's not working for pages.  I have used the code displayed exactly the way it is shown here (with the only modification being that I replaced OL with UL for asthetics) and it's not working.&lt;/p&gt;&lt;p&gt;Is there something I'm doing wrong?  This is a site I'm transferring into Wordpress, so it can blow up and I won't be TOO mad...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daven</dc:creator><pubDate>Tue, 27 Oct 2009 13:39:36 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19954003</link><description>&lt;p&gt;Fixed it, it ended up being a problem with the actual database itself. A wipe of the database and a re-installation solved the problem, and both the first and second code snippets work perfectly now.&lt;/p&gt;&lt;p&gt;I have no idea what could have caused the database to screw itself up so royally, but that was the problem, not your code! Sorry for the mix-up, and thanks a lot for the help!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ashley</dc:creator><pubDate>Thu, 01 Oct 2009 19:53:32 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19954002</link><description>&lt;p&gt;That's weird. I tried it just now and it worked as expected. I know pastebin tends to add #'s when you copy and paste sometimes, did you remove those?&lt;/p&gt;&lt;p&gt;I'm not sure about this WordPress category issue but I believe I had a similar issue when making the sidebar widget table of contents. No matter what I set the category to it was always getting the wrong posts. The solution was the same as the solution I used in the new code - using the database table field names directly instead of relying on WordPress's template functions for the title and permalink.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Wed, 30 Sep 2009 00:14:51 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19954001</link><description>&lt;p&gt;My fix was to replace category() with category_name().&lt;/p&gt;&lt;p&gt;Your new code results in a blank page (my server seems to have turned off PHP errors). But the initial problem seems to be my installation. It seems to think &lt;i&gt;every&lt;/i&gt; post is in category 4 (even when navigating in the WP control panel).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ashley</dc:creator><pubDate>Tue, 29 Sep 2009 09:03:17 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19954000</link><description>&lt;p&gt;My apologies, WordPress seems to have killed my comment.&lt;/p&gt;&lt;p&gt;Code:&lt;br&gt;&lt;a href="http://php.pastebin.com/f9be2b8e" rel="nofollow noopener" target="_blank" title="http://php.pastebin.com/f9be2b8e"&gt;http://php.pastebin.com/f9b...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Tue, 29 Sep 2009 05:18:36 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19953999</link><description>&lt;p&gt;I'm sorry for the late reply. WordPress marked the message as spam due the number of links. Looking at your site, it appears you fixed it, but I'll go over a solution here.&lt;/p&gt;&lt;p&gt;Try this (I haven't tried it, but I think it should work):&lt;/p&gt;&lt;p&gt;&lt;a href="http://php.pastebin.com/f53118d4e" rel="nofollow noopener" target="_blank" title="http://php.pastebin.com/f53118d4e"&gt;http://php.pastebin.com/f53...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Good luck. If this works, I'll replace the code in the tutorial with it.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Tue, 29 Sep 2009 05:12:53 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19953998</link><description>&lt;p&gt;I'm sure it's something simple like, "oh, you've got an extra apostrophe" or something, but it seems to be displaying every post, instead of just the posts from category ID "4".&lt;/p&gt;&lt;p&gt;&lt;a href="http://heiwuya.net/serial-fiction/the-crow/table-of-contents/" rel="nofollow noopener" target="_blank" title="http://heiwuya.net/serial-fiction/the-crow/table-of-contents/"&gt;http://heiwuya.net/serial-f...&lt;/a&gt; Is the page in question, and I've got screenshots of all the applicable code (I hope)&lt;/p&gt;&lt;p&gt;&lt;a href="http://img59.imageshack.us/img59/3285/editcategory.png" rel="nofollow noopener" target="_blank" title="http://img59.imageshack.us/img59/3285/editcategory.png"&gt;http://img59.imageshack.us/...&lt;/a&gt;&lt;br&gt;&lt;a href="http://img185.imageshack.us/img185/4083/edittheme.png" rel="nofollow noopener" target="_blank" title="http://img185.imageshack.us/img185/4083/edittheme.png"&gt;http://img185.imageshack.us...&lt;/a&gt;&lt;br&gt;&lt;a href="http://img32.imageshack.us/img32/897/tableofcontentspage.png" rel="nofollow noopener" target="_blank" title="http://img32.imageshack.us/img32/897/tableofcontentspage.png"&gt;http://img32.imageshack.us/...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I also double-checked it against the WP Codex, and tried hard-coding the value for the category in there. It seems fine to me, and I tried copy &amp;amp; pasting the example from the Codex, to no avail.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ashley</dc:creator><pubDate>Fri, 25 Sep 2009 16:30:30 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19953997</link><description>&lt;p&gt;I'm glad. Let me know if you get it work, please.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Fri, 25 Sep 2009 01:03:39 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19953996</link><description>&lt;p&gt;It's not too complicated. My PHP knowledge is virtually nill nowadays (I haven't done much programming in two years or so), but I think I can get this going ;) I didn't even think of using a custom page template : D&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ashley</dc:creator><pubDate>Wed, 23 Sep 2009 22:54:24 -0000</pubDate></item><item><title>Re: WordPress Tutorial &amp;#8211; Table of Contents in a Page</title><link>http://sorrowfulunfounded.com/tutorials/wordpress/table-of-contents-page#comment-19953995</link><description>&lt;p&gt;TL;DR version:&lt;/p&gt;&lt;p&gt;1. Copy page.php template.&lt;br&gt;2. Rename copy table_of_contents.php&lt;br&gt;3. Make the edit I suggest in the main article.&lt;br&gt;4. Save template / upload&lt;br&gt;5. Create New Page&lt;br&gt;6. Fill in title and content&lt;br&gt;7. Select the Table of Contents custom template under Attributes.&lt;br&gt;8. Add a custom field named "toc_category_id" with the value being the ID of the category containing your chapters.&lt;br&gt;9. Publish&lt;br&gt;10. Enjoy your new table of contents page.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christopher Clarke</dc:creator><pubDate>Wed, 23 Sep 2009 13:14:22 -0000</pubDate></item></channel></rss>