Duplicating Table of Contents for Paginated Post
You split post content into multiple pages with <!–nextpage–>, so you can use $page_number = get_query_var( ‘page’ ) to get current page number and global variable $numpages to get the number of pages in current post. Displaying table of content: global $numpages; $post_link = get_permalink(); $page_number = get_query_var( ‘page’ ); $toc = [ 1=>’Introduction’, ‘I2C … Read more