Archived topic
One page website - linking from landingpage to mainpage
8 replies · Started by Karim on January 25, 2017
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.
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; ?>
I would never come up with that one, and you are right captain, it works :)
My thanks;)
Cheers
You're welcome :)
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...
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.
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/
Thanks Captain, appreciate it:)
Cheers!
No problem :)