Home › Forums › WoodMart support forum › HTML Block not Working in navigation
HTML Block not Working in navigation
- This topic has 9 replies, 2 voices, and was last updated 1 year, 10 months ago by
Artem Temos.
-
AuthorPosts
-
May 2, 2023 at 11:56 am #463723
BPPParticipantHi
I want to use HTML blocks in my navigation to create menu-Links that will work with javascript (out of SEO-reasons). While this worked perfectly fine for the first menu link it failed for the additional menu-items i wanted to add (see Screenshot). Can you take a look at this? i can’t find the reason while it stopped working.
kind regards
ChrisAttachments:
You must be logged in to view attached files.May 2, 2023 at 4:28 pm #463830
Artem TemosKeymasterHello,
If it doesn’t work only for the last menu items then it is a problem with the PHP max input vars limit. It simply can’t process a large amount of data when you save the menu. Try to contact your hosting provider and ask to increase this parameter. You can check its value in WooCommerce -> System status.
Kind Regards
May 2, 2023 at 4:59 pm #463846
BPPParticipantHi Artem
Good guess but it got to be something else. The setting for the input vars was already rather high (4000) and i tried out even much higher settings without success.
I can switch position between the working and the non-working Menu items and it makes no difference, it’s still only the one html-block i created first that is working. i’ve compared it to the others multiple times but i can’t find any substantial difference that could cause the issue.
May 3, 2023 at 9:08 am #463970
Artem TemosKeymasterHello,
I just tried to add an HTML block to the last menu item and it seems to be working correctly. Check this screenshot https://gyazo.com/e2c07b75020e28861d269604864d5688
Kind Regards
May 3, 2023 at 10:10 am #463991
BPPParticipantOK i got it now…
This is ultra confusing and took me a long time to figure out. The settings are poorly designed in my opinion!
Once a HTML-Block is added to the menu you need to go to:
“Dropdown settings” ➝ “Design” and choose something other than the “default” Value.
Only then another select appears where you get to choose which html-block shall displayed (which i kinda already had to choose when i added the block to the menu in first place…). If nothing is selected there no html-block will be displayed at all, just the plain link.
As i don’t want my Blocks to be displayed over the full site-width i then had to switch “Dropdown settings” ➝ “Design” back to “default” which leads to the block only being displayed in the width it needs. But this also hides the dropdown where you get to choose witch block you want though the previously made setting is preserved.So when i compared the first Menu item which worked with the other ones i had no chance to spot any difference…
Thanks however for giving the right hints. Problem is solved but UI should be improved if there’s no good reason for it to be this way.
May 3, 2023 at 11:17 am #464025
Artem TemosKeymasterHello,
If you don’t want to use full width dropdown then you would better use “Set sizes”. Default design is for standard menu dropdowns made without HTML Blocks.
Kind Regards
May 3, 2023 at 3:06 pm #464139
BPPParticipantOK for the regular navigation this works as i intended now.
How about the mobile-navigation? i’ve set up another menu for it (called “Mobile-Navigation”). I’ve tried to setup the HTML-Blocks in the same way here but it does not work so far.
Is it possible to display Blocks here too?Kind Regards
ChrisMay 3, 2023 at 4:21 pm #464172
Artem TemosKeymasterHi,
Megamenu dropdowns built with HTML Blocks are supported by the main desktop menu only. You need to create separate mobile navigation in Appearance -> Menus without HTML Blocks dropdowns.
Regards
May 3, 2023 at 5:14 pm #464190
BPPParticipantIs there any other way to inject custom-HTML into the mobile navigation? it doesn’t have to be the dropdowns.
May 4, 2023 at 9:09 am #464336
Artem TemosKeymasterUnfortunately, HTML blocks are not supported there. We have this in our feature requests list so probably it will be added in one of our future updates.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register