Hello,
I’m using the GP smooth scroll on my site. I edited how it loads, to select only links within my class of “.entrycontent”.
Using this code:
/* Add smooth scroll to entry copy anchor links */
add_filter( 'generate_smooth_scroll_elements', function( $elements ) {
$elements[] = '.entry-content a[href*="#"]';
return $elements;
} );
It works well and is convenient for the client, as they can just create anchor links and enjoy the smooth scroll without having to worry about adding additional classes to content. But recently, I have added a tabbed accordion module, which uses anchors to reference the tabbed content visible. The new tabbed content doesn’t work well if it scrolls every time someone clicks on a tab.
So I’m wondering if there is a way to exclude certain css classes in this function as well? E.g. Include anchor links within the CSS class “entry-content” AND exclude links within the CSS class “tabbed-content”.
This way I could exclude the links in the tabbed content. Thank you!