[Resolved] One page website – linking from landingpage to mainpage

Home Forums Support [Resolved] One page website – linking from landingpage to mainpage

Home Forums Support One page website – linking from landingpage to mainpage

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #268341
    Karim

    Hello guys,

    I am back with a question about my one page site, which i build with GP off course and Elementor.

    So i build this one page website: http://www.ht-installaties.nl
    It all looks perfect and all, but i encounter a new challenge(for me that is)

    In the regular menu i targeted all sections with id’s like #overons and #diensten etc
    This works perfect if you stay on the same page. But i have to do some SEO now through landingpages. I want to link to the mainpage through several links, but i don’t see how i can. When i place a link on a landingpage and target the homepage including the row id, nothing happens.

    On this page you see what i mean. https://www.ht-installaties.nl/cv-ketel-onderhoud-rotterdam/
    I wanna be able to click buttons like this, after which it will jump to the section i target on the mainpage.

    This should be possible, right? If so, what am i doing wrong?

    Really hope you can help me.

    #268482
    Tom
    Lead Developer
    Lead Developer

    I think this may be due to the javascript I gave you for dealing with the offset/smooth scrolling.

    Can you make sure it loads only on the home page in the hook like this:

    <?php if ( is_front_page() ) : ?>
        Script in here
    <?php endif; ?>
    #268654
    Karim

    I would never come up with that one, and you are right captain, it works πŸ™‚

    My thanks;)

    Cheers

    #268656
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

    #268657
    Karim

    Oh! Noticed one thing though. When i visit homepage, the menulinks scroll perfectly where i set them, but when coming from the landingpage it scrolls too far down.

    Tricky one…

    #268668
    Karim

    Hello again Tom.

    I just think onepage websites ain’t always the best in SEO, when using landingpages.
    Maybe i just need to rethink and see what i do.

    If fixing this costs you too much time, just leave it, dont bother.

    #268674
    Tom
    Lead Developer
    Lead Developer

    They’re definitely not the best for SEO.

    If you do want to do it, maybe this will help?: https://john-dugan.com/fixed-headers-with-hash-links/

    #268680
    Karim

    Thanks Captain, appreciate it:)

    Cheers!

    #268687
    Tom
    Lead Developer
    Lead Developer

    No problem πŸ™‚

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