WordPress Easy Contents

Posted on February 25th, 2010 in WordPress.

WordPress Easy Contents will create an table of contents for your WordPress Blog posts.

For example
You write a post with several h2 headings. When I’ve written a long post with a lot of h2 headings I always added manually a short table of contents with anchor links to the headings at the top of the post. A long time consuming process and I’d rather do it automatically: with WordPress Easy Contents.

Example

This is the example of the table this plugin:

Screenshots

screenshot-1

Installation

Download the zip file from the WordPress plugin directory.

  • Upload the folder wp-easy-contents to the ‘/wp-content/plugins/’ directory
  • Activate the plugin through the ‘Plugins’ menu in WordPress
  • Navigate to Manage > Option > Easy Contents to configure plugin output.

Usage

It’s very simple. Add a <!- -contents- -> tag to your post in the html view port. Please remove all the spaces!

Upgrading

  • Delete the old plugin folder ‘wp-easy-contents’.
  • Upload the folder wp-easy-maps to the ‘/wp-content/plugins/’ directory
  • Activate the plugin through the ‘Plugins’ menu in WordPress
  • Navigate to Manage > Option > Easy Contents to configure plugin output.

Frequently Asked Questions

Is it possible to modify the style of the table of contents?
Yes of course, change the css file to your own preferences.

Where do I find a change log?
You can find the change log in the changelog on this page.

Where do I have to suggest some modifications?
Suggest modifications in the comments section on this page.

Known Bugs

Please notify me about the bugs in the comments.

Roadmap

In this list you can find some features which will be added in the feature.

  • A button in the wysiwyg editor to easily add the table of contents to the post.
  • Alignment of table per post/page (not by the amount of headings)
  • Multiple levels in the table of contents

Change log

  • 1.3 Released 27 Feb 2010
    • Minor bug fix for the urls in the table and elements
  • 1.2 Released 22 Feb 2010
    • File structure fix for the wordpress plugin directory
  • 1.1 Released 6 April 2009
    • Table of contents on posts and single pages visible
  • 1.0 Released 5 April 2009

31 Responses to “WordPress Easy Contents”

  1. May 25th, 2009 at 05:57

    Mark says:

    Hi,

    I installed this plugin and it messed up my page!!! and i do not know how to fix it. Now on my dashboard and my website I see this at the top of all my pages.

    Warning: include_once(/home/content/s/o/l/solesirius/html/wp-content/plugins/wordpress-easy-login/) [function.include-once]: failed to open stream: No such file or directory in /home/content/s/o/l/solesirius/html/wp-settings.php on line 473

    Warning: include_once() [function.include]: Failed opening ‘/home/content/s/o/l/solesirius/html/wp-content/plugins/wordpress-easy-login/’ for inclusion (include_path=’.:/usr/local/php5/lib/php’) in /home/content/s/o/l/solesirius/html/wp-settings.php on line 473

    Please contact me at solesirius@gmail.com I need this to be fixed. My site is a major site in the sneaker genre, we have a lot of dedicated users and they wouldnt appreciate this bug on the page. Please help me.

    Thank You.
    Mark

  2. May 25th, 2009 at 05:58

    Mark says:

    sorry it was easy login that i tried to install… please help me

  3. May 30th, 2009 at 21:27

    Thorwald Westmaas says:

    I updated all the files but the plugin is not listed under the un-activated plugins.

  4. June 16th, 2009 at 21:30

    Ankit Shekhawat says:

    hi,

    is there a way i can add the toc to my template / sidebar

  5. June 22nd, 2009 at 08:24

    Fernando says:

    I have downloaded your plug-in but when I open the zip file there is only a readme.txt file. Is this correct? thank you.

  6. July 2nd, 2009 at 17:15

    appoidePsyday says:

    Очень понравился ваш блог! Подписался на rss. Буду регулярно читать.

  7. July 10th, 2009 at 05:53

    Hikari says:

    This is a great idea, but the plugin is not working properly.

    It wasn’t supporting ids and classes inside headers, then I changed the pattern to the following
    ‘#\(.+?)\#si’

    But it still breaks if inside the $element tag has some other tag, like an anchor.

    My suggestion is to make it more flexible and a bit more complex.
    Create a pattern that searches for , and each time it appears it adds an item to the index.

    The problem with this idea is how to store the text that will be shown in the index.

    If you like the idea call me on email and I can help test it. Infortunately my PHP skill is not enough to develop it :(

  8. July 10th, 2009 at 05:54

    Hikari says:

    This is a great idea, but the plugin is not working properly.

    It wasn’t supporting ids and classes inside headers, then I changed the pattern to the following
    '#\(.+?)\#si'

    But it still breaks if inside the $element tag has some other tag, like an anchor.

    My suggestion is to make it more flexible and a bit more complex.
    Create a pattern that searches for , and each time it appears it adds an item to the index.

    The problem with this idea is how to store the text that will be shown in the index.

    If you like the idea call me on email and I can help test it. Infortunately my PHP skill is not enough to develop it :(

  9. July 10th, 2009 at 05:55

    Hikari says:

    Trying again with pre tag…

    ‘#\(.+?)\#si’

  10. July 10th, 2009 at 05:56

    Hikari says:

    Well I can’t post the string, call me on email and we can talk better.

    Sorry for all those duplicate comments -.-

  11. July 10th, 2009 at 08:03

    Hikari says:

    Hey I managed to make it work!

    Contact me so I can show you what I did :)

    Unfortunately it is not compatible with current version, ppl already using the plugin can’t use my version. But is is much more versatible and works gracefully! It will be much easier for ppl like me that didn’t use it yet :D

  12. August 15th, 2009 at 11:08

    haceSmimmitle says:

    Классная статья – спасибо!

  13. October 4th, 2009 at 00:02

    doug says:

    Well I dropped the folder “wordpress-easy-contents” into the wp-contents/plugins folder and… wp does not show it in the plugins config area anywhere.

    The contents of the downloaded plugin look like deveopment folders (branches, tags, trunk) with no root-level php file .. shouldn’t there be one?

    wpress 2.8.4

    -d

  14. October 4th, 2009 at 00:09

    doug says:

    yeah, just copy the files under his “trunk” folder up under the wordpress-easy-contents, then it will show up.

    Doesn’t do anything to my posts though, even with at the top. and lots of H1, H2s, etc.

  15. December 29th, 2009 at 22:12

    iplnts says:

    Hi,
    It is a promising simple plugin, thanks for it.
    However:
    I’ve downloaded more times the above zip file from wordpress plugin site, but the zip only contains the readme.txt !!! Surely, it will do nothing unfortunately :(
    Please look after!
    Thank you

  16. December 29th, 2009 at 22:21

    iplnts says:

    Hi, again
    I found the correct link and successfully downloaded the
    wordpress-easy-contents.1.1.zip
    But, anyway the above download points to an earlier version which is a bit confusing.

  17. February 12th, 2010 at 22:10

    WordPress Easy Login :: Crispijn Verkade says:

    [...] Please notify me about the bugs in the comments. [...]

  18. February 27th, 2010 at 04:21

    Crispijn says:

    I’ve fixed the file structure bug! Hope you guys will try to install the plugin again!

    Cheers!

  19. March 1st, 2010 at 17:08

    Christian Gross says:

    I am trying to use this library and it does not seem to be building the table of contents. I have set the system to h1,h2, h3 headers.

    http://www.happyasahippo.com/?page_id=97

  20. March 1st, 2010 at 17:47

    Crispijn says:

    Have you set the (html commented “contents”) mark in the html interface of the post editor? This should add the table to your post in order to prevent a table of contents by default.

    In thinking about adding another mark for the replacement but I’m not convinced yet. I’ll let you guys know!

  21. March 11th, 2010 at 13:01

    Alexander says:

    It doesn’t seem possible to use several values of h1,h2,h3 to be auto-build? I combined several types which resulted in an empty TOC. Great plugin, but unfortunately not (yet) suitable for my purposes.

  22. March 11th, 2010 at 13:04

    Crispijn says:

    I’m working on a version that works with all kind of h* elements with several levels, maybe unlimited. I reccommend you to keep this plugin in your plugin list so you’ll receive a message when I’ve updated the plugin.

    Cheers!

  23. March 11th, 2010 at 13:27

    Alexander says:

    I didn’t like the alternatives, so I implemented your plug-in anyway. Looking forward to the future improvements, keep up the good work!

  24. May 7th, 2010 at 23:14

    Remo Knops says:

    I really hope that you will be able to release a new version soon, that build a TOC for h1, h2, h3 ! ;o) This is a plugin I have been wanting for quite some time !

    Keep up the good work.

    // Remo Knops

  25. May 14th, 2010 at 21:41

    Morten says:

    Hi, thanks for a great plugin.

    You should probably use the Wordpress Shortcode API instead of the html comment to insert the index: http://codex.wordpress.org/Shortcode_API
    This will make it possible to add the shortcode without going to the html-editor. This will also make it easy to use shortcode arguments to override default settings.

  26. May 15th, 2010 at 11:44

    Crispijn says:

    @Morten:

    I’ll implement this soon, and for the guys who are using my html commented version nothing will change.

    I’m working on a new version that will handle h1, h2, and h3 tags and you can set the level of TOC with the WP shortcode.

    Stay tuned!

  27. May 19th, 2010 at 11:40

    Remo Knops says:

    @Crispijn,

    Do you have any time-frame in mind ? Your ideas for the new version look very promising, exactly what I’m looking for !

  28. May 29th, 2010 at 20:57

    Yann says:

    Hi,
    I must be missing something..
    the plugin is active, what do I do now ? :)
    1/ I can’t find this path : Manage > Option > Easy Contents
    2/ what do I write in the html inteface ?
    thanks and sorry for the bother..

  29. May 31st, 2010 at 08:52

    Yann says:

    Hey again
    resolved number 1 (in my dashboard its : settings>easy contents)
    I inserted the tag in the html interface, but no results ..

  30. July 26th, 2010 at 16:55

    Gregg says:

    Having a problem getting it to work under WordPress 3. Should it?

  31. July 27th, 2010 at 06:12

    Crispijn says:

    No, it shouldn’t… Here an example on a 3.0 environment:

    http://youngdutchdesign.com/local-web-development-on-mac-osx

    Still having problems? Just give me some exact errors and notices.

    Crispijn

Leave a Reply

Notify me of followup comments via e-mail