Using [toc] shortcode – Links are not working anymore
-
I’m working with your beautiful plugin, but I need this TOC outside of my content area. So I disable automatic placement from the plugin and used the following code:
<?php get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="customdiv"><?php echo do_shortcode('[ez-toc]'); // Also tried [toc] ?></div> <div class="customdiv2"> <h1><?php the_title(); ?></h1> <?php the_content(); ?> </div>
The table is still loading nicely, but clicking on the links don’t work anymore. The url changes, the anchor link is still on them, but the Headings in the content are not getting the span ID’s that are needed to scroll to.
<h2>Title x<span class=”ez-toc-section” id=”Title-x”></span></h2>
This span is now not inserted when using the shortcode.Do you have any idea what setting I’m missing?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Using [toc] shortcode – Links are not working anymore’ is closed to new replies.