-
AuthorPosts
-
April 9, 2018 at 1:21 am #938930
Hi Enfold team,
I added custom css classes to my menu items to display fontawesome icons. This works wonderfully when the menu is displayed in the header.
But if I display the same menu inside a widget area, this custom css appears to get stripped. (It seems that while loading, the icon is still displayed, only after everything is finished, it is removed.)Is there a way to keep my custom css in all widget areas?
Cheers,
ChristophApril 9, 2018 at 7:16 am #938979Hey Christoph,
Where can we see the element where this is not working?
Best regards,
RikardApril 9, 2018 at 8:56 am #939013The menu widget is located in the rightmost footer column. (Linktext “Start”).
TestsiteApril 9, 2018 at 1:32 pm #939162Hi Christoph,
I do not see any additional css added to that menu. Can you share the css?
Best regards,
VictoriaApril 9, 2018 at 2:33 pm #939238Yes exactly that is my problem. The menu in the footer is the same as in the header (where the custom css is correctly displayed).
The li element has the classes “fas fa-home” addedApril 10, 2018 at 7:41 am #939648April 10, 2018 at 7:14 pm #939984Hi Victoria,
I’m sorry if my previous posts weren’t clear. (English isn’t my native language. Deutsch wäre eine Alternative ;-) )
I hope to clear it up now:For testing purposes I used the same(!) menu in the header:
(The header is only visible when scrolled down)and in the menu widget inside the footer:
Am I doing something wrong?
I tried placing the widget inside a custom widget area, but with the same result.Cheers,
ChristophApril 11, 2018 at 10:24 am #940364Hi Christoph,
I’m not sure how that should work to be honest. Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardApril 12, 2018 at 9:48 am #940829Please look in the private content section.
April 13, 2018 at 5:34 am #941248Hi,
Thanks for that. I added the icon as markup instead and that is working:
<i class="fas fa-home"> </i>Start
Please check your site.
Best regards,
Rikard- This reply was modified 6 years, 8 months ago by Rikard.
April 13, 2018 at 7:50 pm #941653First of all thanks for your time.
But tbh that’s a pretty ugly workaround.Do you know why the custom css classes are stripped, e.g. is it Enfold or WordPress that’s responsible?
And if it is done by an Enfold function, where can I find it to modify it to my needs?Cheers,
ChristophApril 14, 2018 at 7:03 am #941833Hi,
Why is it ugly? What’s the difference of adding a class and adding markup?
Best regards,
RikardApril 15, 2018 at 3:20 pm #942216It is ugly because I now have to type the name of the Text in the menu twice (shown text and title). And if I change it, I have to remember to change it twice.
Also when translating fields (e.g. the title of a menu element) with WPML, html tags are being escaped and shown as text in the translation. So this method unfortunately won’t work with my use case.I just tested the my problem on a fresh installation of wordpress without Enfold. There the custom css class is being printed in widgets, too. So I figured this must be specific to Enfold. On the other hand through some googling I found one case where a user of Enfold seemed to be able to use custom css classes in a widget (like I want) successfully:https://kriesi.at/support/topic/title-attribute-in-menu/
Are you sure that there is no solution to the missing css class?
Cheers,
Christoph- This reply was modified 6 years, 8 months ago by Christoph.
April 16, 2018 at 4:26 am #942401Hi,
Thanks for the feedback. I tried to reproduce the problem on a local installation but I was unable to, the classes added are carried over to widgets as well.
I see that you are not running the latest version of the theme, please try to update to 4.2.6: http://kriesi.at/documentation/enfold/updating-your-theme-files/
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.