Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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,
    Christoph

    #938979

    Hey Christoph,

    Where can we see the element where this is not working?

    Best regards,
    Rikard

    #939013

    The menu widget is located in the rightmost footer column. (Linktext “Start”).
    Testsite

    #939162

    Hi Christoph,

    I do not see any additional css added to that menu. Can you share the css?

    Best regards,
    Victoria

    #939238

    Yes 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” added

    #939648

    Hi Christoph,

    It does not have that added
    Image 2018-04-10 at 13.41.02.png

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #939984

    Hi 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:
    Main Menu inside header
    (The header is only visible when scrolled down)

    and in the menu widget inside the footer:
    Main Menu inside navigation widget

    Am I doing something wrong?
    I tried placing the widget inside a custom widget area, but with the same result.

    Cheers,
    Christoph

    #940364

    Hi 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,
    Rikard

    #940829

    Please look in the private content section.

    #941248

    Hi,

    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.
    #941653

    First 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,
    Christoph

    #941833

    Hi,

    Why is it ugly? What’s the difference of adding a class and adding markup?

    Best regards,
    Rikard

    #942216

    It 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.
    #942401

    Hi,

    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

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.