-
Mafergu16
When I add #luggage to the end of the URL, it does not change the items shown in the tab.
-
Please check this article for more info:
https://docs.generateblocks.com/article/adding-html-anchors-for-tabs/ -
Mafergu16
Thank you, that worked.
The only issue I’m running into now is that it’s going past tab titles when I add #luggage, #rv, etc. to the url.
-
Fernando
Hi Mafergu,
It’s in the right position – it’s just that your Sticky header is covering part of the section.
Try enabling smooth scroll for those anchors. Reference: https://docs.generatepress.com/article/smooth-scroll/
Smooth scrolling adds an offset for the Sticky header by default.
-
Mafergu16
Do you know how I can add the smooth scroll to my custom menu?
-
Fernando
You need to enable CSS Classes as such: https://share.getcloudapp.com/6quwK6ZY
-
Mafergu16
Thank you. I added the smooth-scroll to each of them, but it’s still not working.
-
Fernando
They don’t have the smooth-scroll class from my end: https://share.getcloudapp.com/qGuYjk6D
Can you double-check and clear cache?
-
Mafergu16
Ahh, I see. That’s a plugin I use for my menus. So I’m guessing they’re overriding the CSS Classes I inputted.
-
Fernando
I see. You’ll need to check with your plugin if it’s possible to add classes for the menu items there.
-
Mafergu16
So they gave me the following:
add_action( ‘bellows_link_attributes’ , ‘bellows_filter_link_class’ , 10 , 3);
function bellows_filter_link_class( $atts , $item , $args ){
$atts[‘class’].= ‘ smooth-scroll’;
return $atts;
}I added to MySnippets under PHP, but the smooth scroll still isn’t working.
-
the smooth-scroll class has been added to the
li
, it has to be added to thea
in order to work.
https://app.screencast.com/gelXgmS4Z92pE -
Mafergu16
Do you know how I can do that?
-
Sorry, I overlooked it, the
a
already has thesmooth-scroll
class.If it doesn’t work, it’s likely due to JavaScript conflicts which are very difficult to identify and fix, unfortunately.
-
Mafergu16
Okay sounds good.
-
Sorry, couldn’t help more on this 🙁
Thanks for your understanding!
- You must be logged in to reply to this topic.