Adding a table of contents to your WordPress blog is easy. All you need to do is add a few lines of code to your functions.
php file. To add the table of contents, add the following line to your functions.php file:.
function my_table_of_contents() { ?>