[Support request] Custom ToC

Home Forums Support Custom ToC

  • This topic has 1 reply, 2 voices, and was last updated 7 months ago by Leo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1384135

    Hey there,

    I could use some help creating a custom ToC. I don’t want to use a plugin and unnecessarily add an additional request to fetch.

    So, I’ve already have spent some time trying to create one, but it’s still far from ideal (see example website url).

    There are a few issues:

    1) The hierarchy in terms of font size doesn’t work the way I’d like. You’ll see that the start of sections have the smallest font and each indentation has a larger font. Ideally, I need this to be the other way around or at least be consistent in terms of the font size.

    2) I’d like the table border to align with the rest of the text on the page.

    3) I’d like to standardise the space in between the anchor links (the anchor links don’t function yet FYI)

    Hopefully, you guys can help!


    Let me make this easier by providing the existing code:


    <div id="toc_container">
    	<p class="toc_title">Contents</p>
    	<ul class="table-of-contents-list">
    			<a class="smooth-scroll" href="#What-are-the-options-to-delete-pages">What are the options to delete pages?</a>
    					<a class="smooth-scroll" href="#Delete-your-page">Delete your page</a>
    							<a class="smooth-scroll" href="#Should-I-use-a-410-status-code-instead-of-a-404?">Should I use a 410 status code instead of a 404?</a>
    							<a class="smooth-scroll" href="#301-redirect-your-page">301 redirect your page</a>
    								<a class="smooth-scroll" href="#Add-a-noindex-tag">Add a noindex tag</a>
    									<a class="smooth-scroll" href="#Refresh-your-content">Refresh your content</a>
    										<a class="smooth-scroll" href="#Offer-alternatives-to-discontinued-products">Offer alternatives to discontinued products</a>
    										<a class="smooth-scroll" href="#Should-I-delete-old-pages?">Should I delete old pages?</a>
    												<a class="smooth-scroll" href="#Check-if-these-pages-are-receiving-traffic">Check if these pages are receiving traffic</a>
    													<a class="smooth-scroll" href="#Check-if-these-pages-used-to-get-more-traffic">Check if these pages used to get more traffic</a>
    														<a class="smooth-scroll" href="#Check-if-other-websites-are-linking-to-these-pages">Check if other websites are linking to these pages</a>
    														<a class="smooth-scroll" href="#The-framework-process">The framework process</a>
    															<a class="smooth-scroll" href="#Summary">Summary</a>


    #toc_container {
    background: #f9f9f9 none repeat scroll 0 0;
    border: 1px solid #aaa;
    display: table;
    font-size: 85%;
    margin-bottom: 1em;
    padding: 20px;
    width: auto;
    .toc_title {
    font-weight: 700;
    text-align: left;
    #toc_container li, #toc_container ul, #toc_container ul li{
    list-style: outside none none !important;
    Customer Support

    Hi there,

    Unfortunately providing custom support like this is out of the scope of this forum as it’s unrelated to the theme.

    I would really recommend a plugin like this:

    If not you can try asking for help on a general WordPress forum like this one:

    Thanks for your understanding.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.