Plugin Author
malihu
(@malihu)
In plugin settings try enabling “Prevent other scripts from handling plugin’s links” under “Advanced options”.
This should remove theme’s scrolling functionality from the links that are handled by “Page scroll to id”.
Let me know if this helps
Thank you for responding.
That was already enabled, sorry I didn’t mention it. I went ahead and installed the plugin on the live site here: http://villa7.ectopress.com/ – it also has the “prevent other scripts…” setting enabled.
This is the code that I added
[ps2id_wrap id=’gallery’ offset=’500′]
[metaslider id=650]
[/ps2id_wrap]
Does this code look correct? Or am I missing something?
Plugin Author
malihu
(@malihu)
The shortcode you’ve added is not correct. The offset is not an attribute of the target shortcode. It’s an attribute of the link shortcode. In other words, the offset goes on the links (not the targets).
If you simply want to “move” the gallery down (as with the rest of your sections), you can simply give it a top padding equal to the other sections top border. So maybe the solution you need is to add the following CSS:
#gallery{
padding-top: 74px;
}
If you want to use an offset value for all your links, you should add the value you want in plugin settings “Offset” field.
Thanks again. I apologize for misunderstanding the instructions.
My current link inside the WordPress Menu area is like so:
http://villa7.ectopress.com//#gallery
How do I append this link with the offset attribute? Would it be like this…
http://villa7.ectopress.com//#gallery:fixed:height(>50):height(<100)
or like this
http://villa7.ectopress.com//#gallery offset=’100′
I think they’re not correct because they do not work at all. Please tell me what I’m doing wrong.
Regarding your other suggestions, thank you but I want to offset only the gallery’s landing point. And adding extra padding to the top of the gallery does not look too good.
Thank you for your help.
Plugin Author
malihu
(@malihu)
No problem π
You can add the extra top padding and subtract the same value from the top margin so everything stays visually the same. For example:
#gallery{
padding-top: 74px;
margin-top: -74px;
}
The link-specific offset can be applied on the link shortcode. To add one on a WordPress menu item, you’d need to do it via javascript (unless the theme allows HTML data attributes on menu items).
Hey that’s a cool trick π Thank you for suggesting that. This will work for me. I really appreciate your help!
Plugin Author
malihu
(@malihu)
Glad I helped. Thanks a lot for your review π