Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1390225
    sovann
    Participant

    Is it possible to use the table of contents to link to specific sections within a page or post? If so, how?

    My website post with Table of Content: http://www.mysovann.com/4-reasons-why-everyone-needs-marketing-skills/ but when i click to the list in the table of content it does not link to the specific section as i want it to go there.

    I found this post but i still could not make each list of content link to specific section with the post. https://community.theme.co/forums/topic/table-of-contents-link-to-an-anchor/

    Please help ASAP.

    Thank you

    #1390318
    Joao
    Moderator

    Hi There,

    You will need to add an ID to your sections for example ID: section-1

    than link it to #section-1

    And so On.

    Hope that helps

    Joao

    #1391074
    sovann
    Participant

    Please share me the code or how. I don’t know how to do it.

    Thank you

    #1391480
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! At the moment, the section ID will not help because it is not define on the page. You need to create an anchor tag or an element with the ID so that you can use this ID to link to that section. To assist you better with this issue, would you mind providing us the url of your site with login credentials?

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password (only if necessary)

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1391536
    sovann
    Participant
    This reply has been marked as private.
    #1391617
    Paul R
    Moderator

    HGi,

    Toc will not work in this set-up.

    Please use standard html link.

    eg.

    
    <a href="#better-listener" >1. Become a better listener</a>
    

    Note that I added #better-listener as link

    You need to add it as id to the section you want it to link to

    eg.

    
    <ol>
    <li>
    <h2 id="better-listener">Become a better listener</h2>
    </li>
    </ol>
    

    Do the same to others.

    eg.

    
    <h4 class="h-toc">Table of Contents</h4>
    <ul> 
        <li><a href="#better-listener">1. Become a better listener</a></li> 
        <li><a href="#decision-maker">2. Become a better decision maker</a></li> 
        <li><a href="#better-observer">3. Become a better observer</a></li> 
        <li><a href="#profitable-machine">4. Become a great profitable machine</a></li>
     </ul>
    
    
     <ol>
         <li>
    <h2 id="better-listener">Become a better listener</h2>
    </li>
    </ol>
     
     <ol start="2">
         <li>
    <h2 id="decision-maker">Become a better decision maker</h2>
    </li>
    </ol>
    

    ….
    Hope that helps.

    #1391708
    sovann
    Participant

    It works perfectly.

    I have one more question with that. Is there any problem with SEO?

    Thank you

    #1391766
    Joao
    Moderator

    Hi There,

    Not at all.

    Let us know if you need further help.

    Joao

  • <script> jQuery(function($){ $("#no-reply-1390225 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>