Title: Skip heading by CSS class
Last modified: January 12, 2023

---

# Skip heading by CSS class

 *  [James I.](https://wordpress.org/support/users/nootropixcom/)
 * (@nootropixcom)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/skip-heading-by-css-class/)
 * Hi,
 * Is there a way to skip a heading that has a particular CSS class?
 * Thanks,
 * Giacomo

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

 *  [rico1995](https://wordpress.org/support/users/rico1995/)
 * (@rico1995)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/skip-heading-by-css-class/#post-16373880)
 * Yes! This is needed, also a way to rename the labels when using a shortcode with
   an attribute. Please let me know if you get an answer to this question.
 *  [Shihab Ul Hoque](https://wordpress.org/support/users/shihab0915/)
 * (@shihab0915)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/skip-heading-by-css-class/#post-16504705)
 * You have a “**Skip Headings**” option for that. You’ll find it under the “**Misc**”
   tab.
 * _Copy & paste the heading text in the “**By Text**” field (that you want to exclude).
   And save your changes._
 * ![](https://i0.wp.com/i.ibb.co/xgWNnL6/lwptoc-settings.png?ssl=1)
 * Otherwise, there is no built-in option to exclude a certain heading from the 
   table. But you can write your own CSS & JS to do that. [parentNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode)
   may be helpful to figure out the container <li> that has a CSS class of “lwptoc_item.”
 * If the above method is complicated for you, you can simply hide the link using
   only CSS. But this will **leave the empty <li>** that you will see after inspecting
   the element. For example- `.lwptoc .lwptoc_item a#hide-it { display: none; }`

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

The topic ‘Skip heading by CSS class’ is closed to new replies.

 * ![](https://ps.w.org/luckywp-table-of-contents/assets/icon-256x256.png?rev=2100677)
 * [LuckyWP Table of Contents](https://wordpress.org/plugins/luckywp-table-of-contents/)
 * [Support Threads](https://wordpress.org/support/plugin/luckywp-table-of-contents/)
 * [Active Topics](https://wordpress.org/support/plugin/luckywp-table-of-contents/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/luckywp-table-of-contents/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/luckywp-table-of-contents/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Shihab Ul Hoque](https://wordpress.org/support/users/shihab0915/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/skip-heading-by-css-class/#post-16504705)
 * Status: not resolved