[Resolved] Creating or changing the Section IDs

Home Forums Support [Resolved] Creating or changing the Section IDs

Home Forums Support Creating or changing the Section IDs

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #137200
    Steven McGregor

    When using sections on a page how do you change the section IDs from ‘generate_section-1’ to something meaningful like “products” or “contact”?

    Sorry, I couldn’t find the answer anywhere else.

    Thanks.

    #137288
    Tom
    Lead Developer
    Lead Developer

    Hmm, interesting – I don’t know if this is possible right now.

    Let me look into it πŸ™‚

    #137329
    Steven McGregor

    Thanks Tom

    I saw a previous post where someone was doing basically a one page site and wanted to link to sections from the main menu. The custom link would look something like http://www.my-domain/#contact or http://www.my-domain/#products. The post didn’t detail how he had renamed the sections and I just can’t find it now to ask.

    Anyway, I am looking forward to hearing from you on this.

    #137404
    Tom
    Lead Developer
    Lead Developer

    What you can do is add something like this into the “Text” editor of your section:

    <a name="contact"><!-- contact section --></a>

    Then you can link to that section the same as using an ID.

    Let me know if that works for you or not πŸ™‚

    #137449
    Steven McGregor

    Thanks Tom. It works almost perfectly. The only thing now is that the Menu Plus sticky menu covers up the first part of the section. It goes to the section but the section title is hidden under the sticky menu. I don’t suppose there is an easy way to fix this.

    By the way WordPress doesn’t seem to like having the section content wrapped so just putting closed ‘a name’ tag at the top of the section works.

    #137518
    Tom
    Lead Developer
    Lead Developer

    Sorry, you definitely don’t want to wrap the section content in the anchor, just place the above at the top of the content πŸ™‚

    As for the first issue, try this..

    Change your anchor to this: <a name="contact" class="target"><!-- contact section --></a>

    Then add this CSS:

    .target:before {
          content:"";
          display:block;
          height:90px; /* fixed nav height*/
          margin:-90px 0 0; /* negative fixed nav height */
    }

    You’ll want to change the 90px to the height of your navigation.

    #137546
    Steven McGregor

    That worked perfectly. Thank you and enjoy the coffee πŸ˜‰

    #137547
    Tom
    Lead Developer
    Lead Developer

    Glad it worked, and thank you so much! Appreciate it! πŸ™‚

    #139590
    Guillaume

    Thank you Tom for this great add-on !

    For a smooth scrolling use this : “Easy Smooth Scroll Links

    Regrads

    Guillaume

    #139623
    Steven McGregor

    Nice one Guillaume. Thanks.

    #329035
    Brent

    mahalo, solved a problem I was having too…

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