Home › Forums › WoodMart support forum › header overlaps anker link section
header overlaps anker link section
- This topic has 7 replies, 2 voices, and was last updated 5 months, 3 weeks ago by Artem Temos.
-
AuthorPosts
-
June 11, 2024 at 7:04 pm #572080
thomas-8605ParticipantHello Woodmart Support Team,
today we found a UX-Bug of your theme.
Lets create an header with your header builder.
Now create an blog post and add an anker link into it.Case:
If visitor click on anker link it will jump to the anker marker.Problem:
But the header will overlaps the headline (first lines) from content. Check also attached screenshot. You can find our link in privat content section please.1. Why your theme does not optimized for this case?
2. We using this theme with +40 projects. We need an clean workflow without custom css for every new header to avoid the header overlaps the content.
3. How to solve that case?
4. Most of all modern themes can handle this case and this situation is nothing new.
In 2018 other users start talking about that issue and named other themes that can handle this case out of the box:
https://xtemos.com/forums/topic/scroll-to-anchor-link-needs-position-adjusting-how/
Do you plan to improve woodmart in that basic case soon please?If not possible please tell me how to cancle all licence codes in bulk on envato/themeforest, because we manage +40 licence/themeforest accounts.
BR
Tommy- This topic was modified 5 months, 3 weeks ago by thomas-8605.
Attachments:
You must be logged in to view attached files.June 12, 2024 at 9:50 am #572145
Artem TemosKeymasterHi Tommy,
Thank you for reaching out and providing detailed information about the issue.
As we can see, you are using some extra plugin or custom JS script which adds this functionality to the links with #. There is no such smooth effect by default in the WoodMart theme. Could you please clarify if you have added any custom code or plugins to achieve this effect? If you’re unsure, please disable all plugins that are not related to our theme.
Additionally, could you provide us with temporary admin access to your site? This will allow us to check the settings and code directly and find a suitable solution to prevent the header from overlapping the content when using anchor links.
Best regards
June 12, 2024 at 3:07 pm #572263
thomas-8605ParticipantHello,
we do not work or change code on your theme.
You can disable all plugins. It will not help and we test this already. And i can see a lot of other users have the same problem in internet groups after using woodmart.I added a stage for you to private content. You can do all what you want on this theme to test and debug. 🙂
BR
TommyJune 13, 2024 at 12:05 pm #572473
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
if ( ! function_exists( 'woodmart_enqueue_custom_scripts' ) ) { /** * Add a script that calculates the height of the Sticked Header and subtracts it from the "scrollTop" value in the Elementor widget "Menu_anchor". */ function woodmart_enqueue_custom_scripts() { ob_start(); ?> jQuery(document).ready(function() { if (window.elementorFrontend) { elementorFrontend.hooks.addFilter( 'frontend/handlers/menu_anchor/scroll_top_distance', function(scrollTop) { var stickyElementsHeight = 0; var stickyRows = jQuery('.whb-sticky-row'); if (0 === stickyRows.length || ! stickyRows.parents('.whb-header').hasClass('whb-sticked')) { return scrollTop; } stickyRows.each(function() { stickyElementsHeight += jQuery(this).height(); }); return scrollTop - stickyElementsHeight; }); } }); <?php $script = ob_get_clean(); wp_add_inline_script( 'woodmart-theme', $script ); } add_action( 'wp_enqueue_scripts', 'woodmart_enqueue_custom_scripts', 40 ); }
June 13, 2024 at 12:06 pm #572474
thomas-8605ParticipantHello Friend,
but do you plan to improve your theme by fixing this issue?
Other themes never had his issue years before. And now we need to add custom php to fix basics with your so great and modern theme. 🙁June 13, 2024 at 12:08 pm #572475
Artem TemosKeymasterHello,
The problem is that this feature comes from Elementor and any other theme that has sticky header will have exactly the same issue. Note that if you use our theme’s anchor links in the navigation it works correctly. Check on our demo for example https://woodmart.xtemos.com/demo-event-agency/demo/event-agency/
June 13, 2024 at 12:25 pm #572479
thomas-8605ParticipantOkay got it.
Is that an extra elementor widget from woodmart?June 13, 2024 at 2:14 pm #572524
Artem TemosKeymasterCurrently, it is available for the menu made via Appearance -> Menus. https://gyazo.com/f31881638f757beb1ded4dd4ad72f04f
We will consider adding this to other links as well. But as for now, you can continue using Elementor and our fix in the child theme. -
AuthorPosts
- You must be logged in to create new topics. Login / Register