-
AuthorPosts
-
March 20, 2018 at 1:14 pm #929811
Hi Enfold-Support,
i have the following problem:
I want to change the line break of a submenu item title with a <br> tag.
But when I put the <br> tag in the title it gets directly removed after saving the menu.
Even when adding a class to the line-break it gets instantly deleted like any other html-tags (span or p tags are also not working).
It doesn’t make a difference if I use an individual link element or the standard page link element in the enfold menu options.How can I get this to work?
Under private content you can see where to insert the line break.
-
This topic was modified 7 years, 8 months ago by
Niemitz (www.bios-tec.de).
March 20, 2018 at 4:12 pm #929906Hey Niemitz (www.bios-tec.de),
Go to Appearance > Menu in your WordPress dashboard.
Expand the sub menu item and use the line break tag “<br/>”between the words you want to break to next line.

The result will be

Best regards,
VinayMarch 21, 2018 at 9:35 am #930449Hi Vinay,
thanks for the quick answer.
Unfortunately this is not working.
When I enter <br/> tag in the Navigation Label and save the menu, the tag automatically disappears and submenu title stays the same.When I enter a
<strong>tag though it is saved, so I suppose it’s a problem with autocorrect filter in wordpress.I googled around and found several ways to address this problem:
(source: WordPress line break not Working: Quick Solutions to keep text formatting intact)Not every solution mentioned on the site was successful but this one worked:
Added this code to functions.php:
function add_linebreak_shortcode() { return '<br />'; } add_shortcode('br', 'add_linebreak_shortcode' );When I insert
[br]in the Navigation Label it is not deleted and works.It’s just a workaround and maybe not the most elegant way to adress this problem but it gets the job done :)
Thanks anyway
-
This reply was modified 7 years, 8 months ago by
Niemitz (www.bios-tec.de).
March 21, 2018 at 8:40 pm #930833Hi,
The line break tag should work by default I’m not sure why it was not working on your site.
Glad you found a workaround.If you need any further assistance please feel free to get in touch with us :)
Best regards,
Vinay -
This topic was modified 7 years, 8 months ago by
-
AuthorPosts
- The topic ‘How to insert line break in submenu item title? (tags are automatically removed)’ is closed to new replies.
