A powerful yet user friendly plugin that automatically creates a context specific index or table of contents (TOC) for long pages (and custom post types). More than just a table of contents plugin, this plugin can also output a sitemap listing pages and/or categories across your entire site.
Contents
- 1 Description
- 2 Screenshots
- 3 Install / upgrade
- 4 Help
- 4.1 The simplest approach
- 4.2 Where’s my table of contents?
- 4.3 How do I stop the table of contents from appearing on a single page?
- 4.4 I’ve set wrapping to left or right but the headings don’t wrap around the table of contents
- 4.5 How do I include the name of the page in the table of contents title?
- 4.6 My site has 100 pages but I only want the table of contents to appear on 10 of them
- 4.7 I want to ignore certain headings
- 4.8 Can I have the table of contents in the sidebar?
- 4.9 Unlike Wikipedia, I want all my anchors to be lowercase and use hyphens rather than underscores
- 4.10 I would like to incorporate a sitemap
- 4.11 The sitemap uses a strange font dissimilar to the rest of the site
- 5 Shortcodes
- 6 For developers
- 7 I love it, how can I show my appreciation?
- 8 Questions or suggestions?
Description
Built from the ground up and with Wikipedia in mind, the table of contents by default appears before the first heading on a page. This allows the author to insert lead-in content that may summarise or introduce the rest of the page. It also uses a unique numbering scheme that doesn’t get lost through CSS differences across themes.
This plugin is a great companion for content rich sites such as content management system oriented configurations. That said, bloggers also have the same benefits when writing long structured articles. Discover how Google uses this index to provide ‘Jump To’ links to your content.
Includes an administration options panel where you can customise settings like display position, define the minimum number of headings before an index is displayed, other appearance, and more. For power users, expand the advanced options to further tweak its behaviour – eg: exclude undesired heading levels like h5 and h6 from being included; disable the output of the included CSS file; adjust the top offset and more. Using shortcodes, you can override default behaviour such as special exclusions on a specific page or even to hide the table of contents altogether.
Prefer to include the index in the sidebar? Go to Appearance > Widgets and drag the TOC+ to your desired sidebar and position.
Custom post types are supported, however, auto insertion works only when the_content()
has been used by the custom post type. Each post type will appear in the options panel, so enable the ones you want.
Screenshots
- An example of the table of contents, positioned at the top, right aligned, and a width of 275px
- An example of the sitemap_pages shortcode
- An example of the sitemap_posts shortcode
- The options panel found in Settings > TOC+
- Some advanced options
- The sitemap tab
Install / upgrade
Install the plugin by searching for Table of Contents Plus from the plugin add menu, or directly from the WordPress plugins repository.
There are no special upgrade instructions (woohoo!). Overwrite your existing folder with the latest or use the streamlined approach in the plugin menu. Your options will not be lost.
Help
The simplest approach
For the impatient, all you have to do is enable the plugin.
The plugin will apply default settings and produce the table of contents before the first heading on pages (not posts, nor custom post types) with four or more headings.
No shortcodes are needed.
Where’s my table of contents?
- In most cases, the post, page or custom post type has less than the minimum number of headings. By default, this is set to four so make sure you have at least four headings within your content. If you want to change this value, you can find it under ‘Main Options’ > ‘Show when’.
- Is auto insertion enabled for your content type? By default, only pages are enabled.
- Have you got
[ no_toc ]
somewhere within the content? This will disable the index for the current post, page or custom post type. - If you are using the TOC+ widget, check if you have the “Show the table of contents only in the sidebar” enabled as this will limit its display to only the sidebar. You can check by going into Appearance > Widgets.
- You may have restricted generation to a URL path match. The setting can be found in the advanced section under Main Options.
How do I stop the table of contents from appearing on a single page?
Place the following [ no_toc ]
anywhere on the page to suppress the table of contents. This is known as a shortcode and works for posts, pages and custom post types that make use of the_content()
I’ve set wrapping to left or right but the headings don’t wrap around the table of contents
This normally occurs when there is a CSS clear directive in or around the heading originating from the theme (Twenty Eleven and Twenty Twelve are two themes which do this). This directive tells the user agent to reset the previous wrapping specifications.
You can adjust your theme’s CSS or try moving the table of contents position to the top of the page. If you didn’t build your theme, I’d highly suggest you try the Custom CSS plugin if you wish to make CSS changes.
Try adding the following CSS to allow the wrapping to occur around the table of contents:
h1, h2, h3, h4, h5, h6 { clear: none; }
How do I include the name of the page in the table of contents title?
As the title of the page changes depending on the page you’re viewing, you can use the following special variable to automatically insert the title of the page into the table of contents heading:
%PAGE_NAME%
You can use it as is or place text either side of the variable.
As an example: if your page is named Great Expectations and your table of contents title is set to Contents for %PAGE_NAME%, the final title would read Contents for Great Expectations
My site has 100 pages but I only want the table of contents to appear on 10 of them
You could put [ no_toc ]
on the 90 pages but that wouldn’t be fun… so try the following:
- Go to Settings > TOC+ and disable the auto insertion option for pages (or the content type you’re working with).
- Add
[ toc ]
onto the 10 pages that need them. Note that the table of contents will appear where you placed the shortcode.
Alternatively, you could also experiment with the restrict path option if the pages you want to include the index on all fall within a certain section of your site (eg /doc/).
I want to ignore certain headings
Use the ‘exclude headings’ option if you would like to ignore certain headings. Separate multiple headings with a pipe |
. Use an asterisk *
as a wildcard to match other text. Note that this is not case sensitive. Some examples include:
Fruit*
ignore headings starting with Fruit*Fruit Diet*
ignore headings with Fruit Diet somewhere in the headingApple Tree|Oranges|Yellow Bananas
ignore headings that are exactly Apple Tree, Oranges or Yellow Bananas
Use the TOC+ widget and drag it into your desired position. If you want the table of contents to only be displayed in the sidebar, then make sure you tick that option in the widget.
Unlike Wikipedia, I want all my anchors to be lowercase and use hyphens rather than underscores
There are two options that allow you to adjust the casing and use of hyphens. If you still require more, you can massage it a little more by attaching into the toc_url_anchor_target
filter. See the developers section for an example.
I would like to incorporate a sitemap
- Create a page for your sitemap (if you have an existing one, use that instead).
- Add
[ sitemap ]
into your page and save.
The above is the simplest example of integrating a sitemap listing all pages and categories. You can customise the sitemap options under Settings > TOC+ or check out some of the more advanced uses with the sitemap related shortcodes below.
You could also incorporate a sitemap using a text widget and pasting any of the sitemap shortcodes.
The sitemap uses a strange font dissimilar to the rest of the site
No extra styles are created for the sitemap, instead it inherits any styles you used when adding the shortcode. If you copy and pasted, you probably also copied the ‘code’ tags surrounding it so remove them if this is the case.
In most cases, try to have the shortcode on its own line with nothing before or after the square brackets.
Shortcodes
The plugin was designed to be as seamless and painfree as possible and did not require you to insert a shortcode for operation. However, using the shortcode allows you to fully control the position of the table of contents within your page. The following shortcodes are available with this plugin.
When parameters are left out for the shortcodes below, they will fallback to the settings you defined under Settings > TOC+.
Shortcode | Description | Attributes |
---|---|---|
[ toc ] | Lets you generate the table of contents at the preferred position. Also useful for sites that only require a TOC on a small handful of pages. |
|
[ no_toc ] | Allows you to disable the table of contents for the current post, page, or custom post type. | |
[ sitemap ] | Produces a listing of all pages and categories for your site. You can use this on any post, page or even in a text widget. | |
[ sitemap_pages ] | Lets you print out a listing of only pages. |
|
[ sitemap_categories ] | Similar to [ sitemap_pages ] but for categories. | |
[ sitemap_posts ] | This lets you print out an index of all published posts on your site. By default, posts are listed in alphabetical order grouped by their first letters. There are CSS classes for each section, letter and list allowing you to customise the appearance. |
|
For developers
How do I customise my anchors?
If you’re still not happy with the anchors, you can modify them to suit your needs through a custom function hooked into the toc_url_anchor_target
filter. As an example, place the below code snippet into your functions.php file to convert all anchors to uppercase.
function my_custom_anchor( $anchor ) { return strtoupper( $anchor ); } add_filter( 'toc_url_anchor_target', 'my_custom_anchor' );
toc_get_index( $content = ”, $prefix_url = ” )
Returns a HTML formatted string of the table of contents without the surrounding UL or OL tags to allow the theme editor to supply their own ID and/or classes to the outer list.
Both parameters are optional:
$content
is the entire content with headings. If blank, will default to the current content found in $post (eg within “the loop”).$prefix_url
is the URL to prefix the anchor with. If a string was provided, it will be used as is. If set to “true” then will try to obtain the permalink from the $post object.
These examples assume you are within “the loop”:
- Obtain the index for the current page
echo '<ul id="my_toc">' . toc_get_index() . '</ul>';
- Create a listing of all children and their headings
$children = new WP_Query(array( 'post_parent' => get_the_ID(), 'posts_per_page' => -1 // get all children )); while ( $children->have_posts() ) { $children->the_post(); echo '<h3>' . get_the_title() . '</h3>' . '<ul>' . toc_get_index( get_the_content(), get_permalink( $children->post->ID ) ) . '</ul>' ; } wp_reset_postdata();
Versioning scheme
I have adopted the same Ubuntu versioning scheme so the first release is 1107.
Other releases in the same month will be dot releases, eg the second release in July 2011 is 1107.1.
I love it, how can I show my appreciation?
If you have been impressed with this plugin and would like to somehow show some appreciation, rather than send a donation my way, please donate to your charity of choice. Feel free to leave a short note here if you’d like.
I will never ask for any form of reward or compensation. Helping others achieve their goals is satisfying enough 🙂
Questions or suggestions?
If you have questions or suggestions, please place them below.
Hey
I used TOC plugin on my website, but my links are not showing in the google search results. Here is the screenshot >> http://prntscr.com/aeu2kj
I am also unable to add that site map because I already added that in one of my page but google accepts xml : is this the reason my links are not visible ?
P.S : I am already use Youst SEO sitemap and submitted that in google too
Is there any way to enable the show/hide feature on the TOC sidebar widget? I can use it just fine with the shortcode in my posts, but I am wondering if there is a way to do it from the widget itself that I am somehow missing.
I like the plugin, but its creating a duplicate title tag, or simply not removing the text from the tag it is replicating so i see the H2 tag twice back to back.. except the very first H2, it has an empty H2, then followed by the new H2 generated by the table of contents/plugin.. all the following tags display twice. Any suggestions?
Thanks so much for this plugin. It is amazing!!!
One question: How can you change the space between the TOC items? Headings of lower hierarchy show a very big space in reference to the next heading of bigger hierarchy. E.g.
h4
h4
h3
h3
← (this space I would like to remove)
h4
h4
I really cannot find the option to change this. Thanks!
-Ivan
Hi, very good plugin congrats 🙂 The problem is my theme is using a sticky menu (stays on top when scrolling), and so when clicking a heading item in the Table Of Content, the heading itself is hidden by the sticky menu. Is there a way for me to tell “when going to a heading after clicking the Table Of Content, go like 30px above that item”.
Hope you understood when I’m trying to say…
Regards
Hello!
I ordered on the main to all pages open in a new tab.
but the contents do not need to be opened in a new tab.
How to make a table of contents could not be opened in a new tab?
Hello!
I ordered on the main to all pages open in a new tab.
but the contents do not need to be opened in a new tab.
How to make a table of contents could not be opened in a new tab?
Hello, thanks for the plugin! I have a question: Is it possible with css when you click on an menu point the h2 is colored ?
Yep.
h2 span:target {
color: red;
}
Amazing PlugIn, I love how simple it is to give a TOC and anchors to the Page.
However I have a page with many anchors put in there myself. (http://www.archery-howto.com/glossar/) Is there a way to do this better? or is there a way to let the Plugin also find and use my handmade anchors?
The easiest way to include your dictionary terms would be to make them heading 3s. That way they will automatically appear in the TOC list and under the letters. You can then use CSS to style them appropriately.
There is no way to include custom predefined anchors.
Hi. I just like to ask whether the table of content plus overrides the meta description set on a blog Post? It seems that there is an overriding circumstance that transpired on my post. Can you give an insight to this please?
This plugin executes on
the_content
filter which is normally ran when producing the content for the page. If the metadata plugin triggers the filter earlier than normal, then TOC+ (and any other plugin that operates in the same manner) would also fire.I love this plugin, I have used it in a couple of blogs and recommended it to several friends. But I just found on my new blog it will be difficult for me to continue using it. On my posts I am appending now a SiteOrigin Post Carousel at the end of my articles, and the title of the carousel plus the titles of my other articles are automatically added to the table of contents. If there was a way to tell TOC+ where it should start and end indexing content, so the unwanted headings wouldnt appear on the index, it would be amazing. It isn´t practical to add the titles of every new article (as they would appear on my post carousels) to the list of unwanted headings. So far I am doing it, but if there were other editors, it would be highly impractical
The simple fix for this would be to tell SiteOrigin Post Carousel to run after TOC+ runs when WordPress fires “the_content”. To do this, you’ll need to edit the Post Carousel PHP file, search for something like
add_filter('the_content', xxx, number)
and change the number to above 100. Alternatively, you can edit toc.php and tell it to run sooner than the Post Carousel. The number controls the queue, the higher the number, the later in the process it runs.Hello Mike,
First of all I would like to thank you for creating such an awesome plugin and supporting it as well.
My question is:
How can we add an extra line spacing BEFORE and AFTER the H2 Headings or first level headings that come in TOC?
Probably with the following CSS?
ul.toc_list > li {
margin-top: 20px;
margin-bottom: 20px;
}
Hey – Good work. I Love it! But how can i echo [toc] on the index page after the newest entries?
is not working..
php echo do_shortcode(‘[toc]‘)
Do you have a static page set for the homepage? If so, you can let TOC+ do its thing by enabling the ‘include homepage’ advanced option in Settings > TOC+
This is such a great addition to my whole Wealthy Affiliate program of developing a navigable website. It has released a logjam in my mind of how to start getting content organized. Awesome. I’m really new to all of this and reading this comments section let’s me know how much I need to learn.
I do have one question – I would like a button at the end of each TOC section to return to the beginning of the TOC. I have installed the plugin to return to the top of the page, but it goes to the very top of the page. I have started the TOC below my first paragraph and do not want to go past it. Is there functionality in your plugin to do this or do I need to add some code or install another plugin?
Thanks again for this great addition to my whole online development experience.
Using the back to top plugin, are you able to provide a custom destination to return to? If so, tell it to go to ‘#toc_container’ which is the TOC box.
I love your plug-in – thanks!
An interesting little problem. My hosting service has enabled ‘Lets Encrypt’ so I am trying out switching sites to serve https pages. Looks like clearing the cache can be an issue – took a little while before all site images loaded as https. The site I am currently experimenting with has [toc] shortcode on selected pages/posts and on https it doesn’t work. Switching on auto insert it does work (where there isn’t the shortcode already). (I’ve checked on a test site that shortcodes work OK on a fresh install).
Any ideas other than uninstalling and reinstalling the plug-in? (I’ve already de/activating.)
Thanks again
To be honest – I don’t think TOC+ has anything to do with http or https. Nowhere in the code does it refer to a protocol. It uses the standard WordPress enqueue methods to pull in styles and javascript. If there is a lag issue, perhaps check enabled plugins that may be providing performance/caching improvements. I am running multiple sites over https and the transition was instant in all cases. In fact, both http and https versions were fine before redirection was enabled.
Hey there! Thats a great Plugin! Just one Problem:
It does not appaer on my Homepage. I cant understand why! It only works on posts and pages which are not the homepage…:(:(
Please help….
It’s disabled for the homepage by default but you can enable it in Settings > TOC+ under the advanced section.
Hi there,
Thanks for the nice plugin.
My header menu floats when page is scrolled and therefor the anchors should be like 30px higher. Is this possible?
Yep, enable smooth scroll and adjust the height offset (if needed) under the advanced options. The default offset accounts for the WordPress admin bar.
Hello Mike,
Thank you for your great plugin, I have been using it for quite some time now and I am very happy with it.
Only recently did I run into something that could be a bug or maybe just a limited option, you tell me.
I have activated a home brew plugin that adds “Featured posts” to the end of “the_content”. Strange thing is that the widget doesn’t pick up the added headings, but the standard in-post-version does?
http://www.landmarkscout.com/liberty-park-war-museum-overloon-netherlands/
Full screen = widget
Scale browser below 700px = shows standard TOC
Could you elaborate on this? Thanks in advance!
The main reason is that the widget does not execute “the_content” which is most likely what the Featured Posts plugin uses to do its thing. So the only content that is provided to TOC+ when compiling its widget is what the author has put into the post edit screen. I’m not sure if there is a safe way to execute “the_content” when doing the widget.
If you can apply some javascript, see http://dublue.com/plugins/toc/comment-page-11/#comment-5151 which would overcome this issue.
Pingback: Plugin para crear una tabla de contenidos en WordPress
Pingback: چگونه برای برگه ها و پستهای سایت، (به صورت اتوماتیک) فهرست مطالب تهیه کنیم - وبی لب WebbyLab
It won’t show the TOC on posts on the main page (where multiple posts show), though it shows for each individual post (upon going to that post’s page). Is it possible to show it on the main page, where multiple posts are shown?
It’s disabled for the homepage but you can enable it in the advanced options in Settings > TOC+. Disabled because it’s not intended to be run when there is a listing of articles (you may get duplicate anchors).
Hi Mike,
My site is Thrive Best dot com.
The TOC does not show up in the content but it works in the sidebar.
I have a friend who has the same theme as mine (Pin Blue) and her TOC works both in content and sidebar.
Any solution for me?
Thanks…
Wow…just what i needed for my lengthy FAQ~ But is there s setting that when someone links to a line in the TOC, when it goes to that content they have a link to return to the TOC without having to scroll a few pages to get back?…many thanks
Tony
Try a persistent back to top link, for example https://wordpress.org/plugins/scroll-back-to-top/
Hi. I love your plugin! nice work, very usefull.
I use toc_get_index() to display the toc in a navbar submenu,
but the anchors are not provided in post heading (no ‘span id=”…”>…</span')
this is because I de-activate the toc for post (I don't want duplicate it in post content or in a widget sidebar)
How can I force the creation of anchors in content?
There is a filter to apply to the_content()?
Thanks!
Hi Mike T, Thanks for the great plugin, I have a website called https://supplementswatch.com/ and after updating the main theme to Schema 3.0, the top offset is no longer respected by it. I need to have 70px for desktop menu and 45px for my mobile menu.
Mike thank you for your altruistic and wonderful support of TOC+. Do you accept donations to help you support your work… coffee gift cards ….
Raf
🙂
Pingback: Table of Contents Plus 1601 | dublue
Hi Mike, thank you for this great and easy to use plugin!
I am using the plugin Aesop Story Telling Engine and I want the TOC of a page/post in a sidebar only. Unfortunately for the sidebar TOC the shortcodes are not yet processed – so the Aesop Chapters (which are actually shortcodes creating h2 HTML) do not show up in the TOC. A TOC at the end of the page with shortcode [toc] shows perfectly all Aesop chapters, too.
Any idea, how I could get the complete toc into the sidebar?
Thanks for any hints!!!
Because the Aesop content hasn’t been created for the page when the sidebar is created, I would not use the TOC+ widget and instead have it produce within the content area. After that, you can use javascript/jQuery to move the TOC to the position you want (in this case, into your sidebar). This was done at http://annualreport.treasury.gov.au/part-2/program-1-1/ with the following simple jQuery:
if ( $('#content #toc_container').length > 0 ) {
$('#toc_container').detach().appendTo('#rhs-fixed');
}
http://annualreport.treasury.gov.au/part-2/program-1-1/ – has a nice feature to hide unused h2,h3,h4,h5,h6, and shows them only if their h1 is active.
How can I add it to my TOC plugin?
Why there is a “Related” menu always showing in the end of the list, while there is no heading tag wrapped with this name.
No idea – do you have a plugin that tries to link up related articles for you? It’s not appearing in the TOC because either the “related” heading is not a HTML heading or the related plugin runs after TOC+.
Pingback: JanPaul999 on "[Plugin: Table of Contents Plus] Scroll offset not working on my site" * Best Wordpress Themes - Reviews
Hi Mike, first of all, great plugin. Thanks. Been using it for a few years and my visitors love it.
That said, I’m having a problem now after switching to a new theme with a consistent top menu…
I have set “Smooth scroll top offset” to 50px but it doesn’t do anything – the setting is not working for me.
Can you please have a quick to see what it could be?
You can see one of my TOC+’s here: http://boracaycompass.com/beaches-guide/
Thanks a ton,
Paul
You must have fixed it because it works for me? Used Firefox, desktop, OSX.
Hi Mike,
Really love the Contents plugin, its made my pages look a lot neater.
I am having a small problem with one of my pages http://thegbear.com/books/
The layout is with little boxes and I want to centre the Table of Contents at the top of the page but it won’t let me in the backend composer in wordpress. Is there another way i can centre the Contents on a page?
Thanks:)
With some custom CSS:
#toc_container {
width: 100%;
text-align: center;
}
I am finding an issue in Mobile pages. When I click a tag from TOC menu it jumps to the right header but at the same time it hides all contents above it.
Say I clicked tag 1.0.5, it jumps to the 5th header correctly but hides all contents above it i.e. 1.0.1 to 1.0.4.
I tried on android devices and different browsers… same results.
Please help.
I checked your site and it doesn’t work in desktop mode either. My gut feel is that either your theme or selection of plugins is tampering with the “click” event on hyperlinks.
You also have 92 HTML errors on the page I was testing which doesn’t help. The issues may stem from any one or all of them.
https://validator.w3.org/nu/?doc=http%3A%2F%2Fwww.imaggino.com%2Fcure-stinky-feet-7-simple-ways
Hi, thanks for your great plugin!
One thing that did not work out for me: When using the table in sidebars only, I can use the general settings (TOC+) to change the minimum of headings necessary to create a table. So far, so good. But I cannot switch off or change the title above the table (by default:”Contents”). It would be great if you could change this with the next update or so.
Best, Dirk
Great suggestion, coming to a new version near you.
https://github.com/zedzedzed/table-of-contents-plus/issues/118
Hi, very nice plugin,
but the plugin always delete settings if I want to save them.
What can I do?
Best Regards
Martin
Sorry but it’s never done that for me? You’ll need to enable your browser’s debugging console to see if there are any issues that is preventing it from saving (eg from other plugins or the theme itself).
Can I show the TOC from 1 page on another?
You will need to use some PHP to do that, check out the example at: http://dublue.com/plugins/toc/comment-page-11/#toc_get_index_content_8221_prefix_url_8221
Hi Mike, Awesome plugin thanks so much for this. I am using it to show all the posts on my site and i usually post twice a week, as i have been doing this for awhile the list has become very long under each main heading
is there a way to show the alphabetic characters and only expand to show the posts withing it only once clicked
sitemap_posts adds a surrounding div around each section of letters with hooks that could be used to apply this affect, so with some javascript and CSS, you may be able to do it? It is a good suggestion though.
Here is the structure:
div.toc_sitemap_posts_section
p.toc_sitemap_posts_letter
ul.toc_sitemap_posts_list
Hi,
It is really good plugin for my site.
Can I change the title in the TOC without changing the title of the actual contents.
I want to make the title in the TOC a little bit shorter.
cheers,
You can try to shrink the size of the font of the TOC index which can simply be done in Settings > TOC+. Alternatively, you can try truncating long lines with ellipsis:
https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/
Nice one. Have been using it from long. List of post can it come like the list of pages instead of grouping in alphabetical order.
Regards
Kitta
Use
[sitemap_posts separate=false]
Pingback: test jump link
Hi,
i love to use your plugin. But i have one little question. I have set the width to 100%, so the toc fits perfect from left to right in the content section. But with this setting, the border on the right side of the toc is missing. You can see an example here: http://www.tvstreamingbox.de/amazon-fire-tv-4k-ultra-hd-im-test/
What can i do, to show the border correctly?
Change the width to 95% and it shouldn’t overlap from the content’s boundaries. You can experiment + or – from there.
Hey there Mike,
Love the plugin.
I am doing an experiment, trying to make it work with a slider (paginated pages).
My results so far http://goo.gl/B7I7oB
Do you have any ideas how to make it work with pages like this?
Thanks again, this is one of the best supported free plugins I have ever seen.
It will probably have something to do with smooth scroll so first turn that off to see if it works. If you want smooth scrolling, then it would need to trigger the slide action of the sliding library you’re using.
Pingback: Table of Contents Plus: A Great WP Plugin for More Traffic (Free) — FAT Stacks Entrepreneur
Hello; Great plugin !! verrry happy with it..
My question.:
Is it possible to create three TOC+ on one page ??
So if….how to do that and what is the procedure to create three TOC+ on one page.
Regards,
Jan
Not natively but as a developer you can with some javascript, for example use jquery’s clone function.
Hello Mike, thank you for your plugin, it rocks. And I mean it!
I have a problem:
1) On posts where I activated TOC+ all the H1,H2,x text went from black to gray. Nothing changed on the pages without TOC+. How to change it and keep TOC+?
Thank you. Website is amazingtelescopes dot com, check out any post, not page.
This plugin encapsulates the headings in html span tags. So if there are visual differences, then your theme has different styles for headings with span tags. I checked your site and this is the case for you, see line 249 of http://www.amazingtelescopes.com/wp-content/themes/hueman/style.css?3f2818
.entry h1 span, .entry h2 span, .entry h3 span, .entry h4 span, .entry h5 span, .entry h6 span {
color: #BBB;
}
To change it, see if you can insert your own custom CSS with something like:
.entry h1 span, .entry h2 span, .entry h3 span, .entry h4 span, .entry h5 span, .entry h6 span {
color: #444 !important;
}
Pingback: Test Matrix Table of Contents - Critical to Success
Why dont have the “include ID”? How to get some page/cate/post by ID only?
Which shortcode are you referring to?
Hello, to help Google Analytics for referencing, Google let us activate the “Console” to check how google see our website. In the “Sitemap” section, we locate our “sitemap” page including only the TOC shortcode (http://plentyplants.org/about-us/contact/sitemap/), but Google doesn’t recognize it as a sitemap, but as an HTML page. Is there any specific link for TOC sitemap to tell Google ?
You’ll want a Google XML sitemap rather than a human friendly sitemap. Try this plugin https://wordpress.org/plugins/google-sitemap-generator/
We’d like to style the TOC… like implementing a decimal and some extra spaces after the number (“1. First Section”), or bold the first level, etc. How might we do this?
You can do all that with some custom CSS. Just inspect the table of contents and you’ll see some selectors you can use to add your styles to. Examples:
For the dot after the number:
.toc_number::after {
content: '. ';
}
For the bolded first level headings:
.toc_list li ul {
font-weight: normal;
}
.toc_list > li {
font-weight: bold;
}
The plugin created a ToC on a page that we did not want it, and despite deleting hte plugin we cannot remove the ToC, can you help? <link removed>
I don’t see any TOC on the page you provided. I didn’t see any signatures of this plugin in the source either.
What if we have a multi-language site and I want “Table des matières” for the French version and “Table of content” for the English version? Is it compatible
I haven’t tested this plugin with any multilingual plugins so I’m not sure if it would behave as intended, however if each of your different languages were a different site or install, then it should be fine. That said, perhaps the multilingual plugin may do it for you?