Title: Add table of contents using php code
Last modified: May 8, 2020

---

# Add table of contents using php code

 *  Resolved [juniorbra](https://wordpress.org/support/users/juniorbra/)
 * (@juniorbra)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/)
 * Hello, I would like to know how I can insert the table of contents using php 
   code. Thanks

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804658)
 * Untested and unsupported:
    - [https://github.com/shazahm1/Easy-Table-of-Contents/blob/2.0.11/includes/inc.functions.php](https://github.com/shazahm1/Easy-Table-of-Contents/blob/2.0.11/includes/inc.functions.php)
 *  Thread Starter [juniorbra](https://wordpress.org/support/users/juniorbra/)
 * (@juniorbra)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804761)
 * Thanks Steven.
 * I manage to solve my problem with the shortcode [toc] but I noticed that the 
   discs are not appearing in the links (ul li). Do you know why?
    [https://prnt.sc/sdeqgo](https://prnt.sc/sdeqgo)
 *  [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804780)
 * Sorry, I do not know what you are asking, can you please provide more details?
 *  Thread Starter [juniorbra](https://wordpress.org/support/users/juniorbra/)
 * (@juniorbra)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804801)
 * Please check this page [https://bit.ly/2xPmrTC](https://bit.ly/2xPmrTC)
 *  Thread Starter [juniorbra](https://wordpress.org/support/users/juniorbra/)
 * (@juniorbra)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804820)
 * I don’t know if it’s the best solution but I’ve changed this CSS and it worked
 * #ez-toc-container li, #ez-toc-container ul, #ez-toc-container ul li, div.ez-toc-
   widget-container, div.ez-toc-widget-container li {
    background: 0 0; list-style:
   disc; <—– line-height: 1.6; margin: 0 0 0 10px; <—– overflow: inherit; <—– z-
   index: 1; }
 *  [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * (@shazahm1hotmailcom)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804843)
 * Ok, I understand now… the CSS changes are one solution. Presently the supported
   options can be found on the Table of Contents Settings admin page.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Add table of contents using php code’ is closed to new replies.

 * ![](https://ps.w.org/easy-table-of-contents/assets/icon-256x256.png?rev=3045459)
 * [Easy Table of Contents](https://wordpress.org/plugins/easy-table-of-contents/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-table-of-contents/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-table-of-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-table-of-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-table-of-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-table-of-contents/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Steven](https://wordpress.org/support/users/shazahm1hotmailcom/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/add-table-of-contents-using-php-code/#post-12804843)
 * Status: resolved