Table of Content [toc] shortcode

[toc] shortcode does not seem to work with Cornerstone designer. It works when I use the Wordpress native content editor but not inside Cornerstone.

Could you please let me know why this happens and if it is just me who is experiencing the problem.

Hi there,

I wonder if the TOC shortcode you are talking about is the native WordPress functionality? Or is it a third party plugin shortcode?

If that is a 3rd party one you will need to be in contact with the developer of the plugin as it might be the case he/she did not use the standard WordPress functionalities.

Whatever is using the standard WordPress features will show in Cornerstone if you add it to the Raw Content element.

Unfortunately, digging deep in the code of 3rd party plugins to make them compatible with our theme or Cornerstone is outside of our support scope which I’m sure you know about already as you are one of our long term customers from 2015.

Thank you :slight_smile:

Hi @christopher.amirian,

The [toc] shortcode is provided by X theme itself and is not a native Wordpress or Third party plugin.

OK… I think I have hacked a solution.

I cannot use <!--nextpage--> tag in cornerstone. Not even in raw element. This is because it gets wrapped in [raw_content] and outputs raw element tag inside section. For some reason… this does not work.

The only way I could get it to work is:

  1. Design ‘Pages’ in section and save it
  2. Open to edit the page in native WP editor. This displays shortcodes created by Cornerstone.
  3. In between two sections type in <!--nextpage-->
  4. So if you have 5 sections, you will need to insert 4 next page code in between each section (NO raw content shortcode)
  5. Save it and it works!

This is a bit annoying and wish it would just work from within Cornerstone. [toc] shortcode can be inserted in Cornerstone with raw content but NOT the <!--nextpage--> code.

The caveat is that - If you edit the page using Cornerstone, all the <!--nextpage--> tags will disappear and will have to be entered again.

Need a way to insert the tag in Cornerstone such as it will be honoured. Raw Content does not work.

Can anyone from @Themeco please let me know how do I insert the next page tag in cornerstone so that it works?

1 Like

Hi there,

It was a working feature but I can confirm that it isn’t working now on my installations. I’ll add this to our issue tracker for further investigation.

Previous thread: https://theme.co/apex/forums/topic/is-not-working-as-expected-using-cornerstone/page/3/

Thanks!

1 Like

Hi @Rad,
Thanks for confirming my problem and escalating it to issue tracker. I hope this will be fixed in upcoming release as I plan to use this feature quite heavily. :slight_smile:

Thanks again.

1 Like

Thank you for understanding!

Was there ever a fix for this? I love using this plugin.

Hi,

This issue was fixed in Pro 2.1.0, X 6.1.0, Cornerstone 3.1.0

https://theme.co/changelog/#theme-pro-2-1-0-theme-x-6-1-0-cornerstone-3-1-0

Please update your Theme and cornerstone to latest versions.

X 6.2.5, Cornerstone 3.2.5

Thanks

Hi,

I have updated every single version of x theme. I’m using a plugin “table of contents” but it isn’t working on desktop well, at least the “scroll” option isn’t working. When you click on the table of contents and click on a header it isn’t scrolling down to that header like it does on mobile… So I know it isn’t the plugin because it works on my mobile version of theme x… I must be doing something wrong.


Can you check it out yourself? It’s the table of contents on this page that isn’t working when you click on a link, but it works in mobile

Hello @degalbo2,

Thanks for updating the thread.

I checked the link you have shared and can see that you are using old version of X Theme and Cornerstone.

Please update X Theme and Cornerstone and see how it goes. Please carefully review out theme update guide.

That being said, this ticket is quite old and started by another user. I request you to please create a new ticket as posting on ticket created by a different user creates lot of confusion and slows down the response time. Please create a new ticket and someone from support team will help you out.

Thanks.

1 Like

Hey,

Well I feel like a dumb ass now. Thank you for your help, I thought I had it updated. Everything works now!

Anthony

You’re welcome, Anthony. :slight_smile: