Ok, I see. Thanks for your reply. For anybody who’s interested, as a temporary fix I did the following:
- In my post template I added a html anchor “post_navigation” to the navigation block and another anchor “post_comments” to the ‘Comments’ text block.
- In function
generate_toc
in file wp-content/plugins/table-of-contents-block/includes/helpers.php
I added the following before the return statement (return $toc
):
$toc .= "<ul style=\"list-style-type: none;\">"; $toc .= "<li><a href=\"#post_navigation\">Post Navigation</a></li>";
$toc .= "<li><a href=\"#post_comments\">Comments</a></li>";
$toc .= "<li><a href=\"#respond\">Create Comment</a></li>";
$toc .= "</ul>";
That works fine for my purpose.