Archived topic
Scroll to id on mobile device went wrong
4 replies · Started by Sander on May 1, 2021
Through this forum I read that you recommend the plugin "Scroll to id" for a One Page website.
I have now activated it on my Generatepress Premium website.
This works well for the desktop version.
This does not work properly on the mobile version.
I've tried working with the # ps2id-dummy-offset element but it doesn't seem to work properly?
What's going wrong here?
Hi there,
What exactly doesn't work on mobile?
Did you check with the plugin's support team first?
Let me know :)
Hi Sander,
Could you specify what and where is the ps2id-dummy-offset element?
Let me know :)
Hi Ying,
Auto-generate #ps2id-dummy-offset element is a function within the Scroll to Id plugin.
In their manual:
Enable if you want the plugin to create a hidden element and use its selector as offset. The element that will be created is: #ps2id-dummy-offset
You should use the #ps2id-dummy-offset value in the Offset option above. You should then use the same selector/value and in your CSS and give it a height equal to the amount of offset you want.
In that case you can write in the stylesheet:
#ps2id-dummy-offset {
height: 0px;
}
@media only screen and (min-width: 768px) {
#ps2id-dummy-offset {
height: 35px;
}
}
But it seems that it is not working properly...
Regards, Sander
Do you have a special reason to use the plugin?
I believe you can use the default WP Gutenberg editor to add HTML anchor and GP Premium offers a built-in smooth-scroll function.
We sometimes recommend other plugins for users, but we can't offer support for other plugins as it's not our expertise, thanks for your understanding.
Here's a video on how to add HTML anchors within GP.
https://youtu.be/f_OaAiJ3oV4
Hope that helps :)