Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #820332

    Hello!
    I am having issues with the update. In the main (and secondary) menu, before I had some elements hidden on mobile and others hidden in desktop. I was using this quick CSS code and it worked fine until today.

    @media only screen and (max-width: 767px) {
    .hide-on-mobile { display: none !important; }}
    @media only screen and (min-width: 768px) {
    .hide-on-desktop { display: none !important; }}
    

    I was using the CSS Class when editing the menu e.g.: http://i.imgur.com/l1fVK0v.png
    This setting worked perfectly before, but now, with the update, those elements does not hide when browsing from mobile devices. http://i.imgur.com/734Gdjg.jpg
    The CSS code does work for the secondary menu in the mobile version of the site (and in every menu in the desktop site), so the problem is on the mobile menu itself.
    Another issue is that the social buttons does not appear on the secondary menu of the mobile site.
    Is there a way to solve this problem?

    Thank you.

    EDIT: If someone has this same problem, I came to a solution: click here

    • This topic was modified 7 years, 5 months ago by geertroggeman.
    #820724

    Hey geertroggeman,

    Please try adding the following to return the social icons on mobile:

    @media only screen and (max-width: 767px){
    .responsive #top #header .social_bookmarks {
        display: block!important;
    }
    }

    As for the other issue, I would like a further explanation as I’m having trouble understanding exactly what it is you need.

    Best regards,
    Jordan Shannon

    #820746

    Hello,
    Thank you, the social button appeared again.

    About the menu, before (the update) I had set a main menu and a secondary menu. The secondary menu has too many elements, and in a mobile device does not looks good. So my client wanted to have a different menu for the mobile version, in order to do this I decided to use some CSS, using this code:

    @media only screen and (max-width: 767px) {
    .hide-on-mobile { display: none !important; }}
    @media only screen and (min-width: 768px) {
    .hide-on-desktop { display: none !important; }}
    

    In this way I could hide elements in both menus for showing elements only for mobile and others only for desktop, using the CSS Classes field in Menus. http://i.imgur.com/l1fVK0v.png
    After the update, this CSS does not work in the mobile main menu, but it still does work in the secondary menu and in all menus in desktop version.

    Here I can show you the main and secondary menu in the desktop website http://i.imgur.com/r9L5MvG.jpg
    But in the mobile site, all elements are displayed in the main menu. http://i.imgur.com/734Gdjg.jpg

    Thank you!

    #820840

    Hi,

    It looks like the .hide-on-mobile class is no longer applied to this section.This could be possible due to the theme update depending on how you went about attaching the class in the first place. If you attach the class back to it then it should resume working as expected.

    Best regards,
    Jordan Shannon

    #820883

    I looked and attaching a class from the menus setting does not apply in the mobile menu. So, is there a way that I could add a css class to the elements in the mobile menu to hide them again?
    Thank you.

    #820904

    Hi,

    It may be possible via JS. Did you use the submenu element in the advanced layout builder? If the following doc does not apply to your situation then we can try to do this via JS.

    Best regards,
    Jordan Shannon

    #820974

    Hey, the problem is that in the new mobile menu, elements does not have their own classes, even if they have one assigned in the “Appearance > Menus” WordPress settings, before the update they worked perfectly.
    So if the elements (pages) are inside of the mobile menu, I can’t do anything from the Advanced layout editor.
    I don’t know if I explained it well.
    If I’m not able to give each element of the mobile menu a class, how can I give them a class in order to hide the elements?

    Or, is there some way that I can have a different menus for mobile and desktop?

    Thank you.

    EDIT:
    It is not necessary to be a class, but how can I give those elements any attribute to identify them and hide the elements I want with css?
    I had an idea of using XFN field in menus settings, because when is used, that attribute appears on mobile menu elements. Even if that works, I don’t know if I should do it in that way. I will wait if you have any better ideas.

    EDIT 2:
    In the case I was not clear in something, I was doing this exact same thing before the update (http://kriesi.at/documentation/enfold/hide-menu-itemselements-on-mobile/)
    I just found it in your documentation, but after the update, this doesn’t work anymore in the mobile menu, you should consider that…

    • This reply was modified 7 years, 5 months ago by geertroggeman.
    #821454

    Hello! I came to a solution (and I hope it to be temporary)…
    So, because the new mobile menu in the 4.1 Version, any change made in the CSS Classes field in “Appearence > Menus” WordPress Setting is not visible in the new mobile menu, meaning that now it is not possible to identify the elements of the mobile menu using CSS classes. And the problem with that, is that now I can not hide elements from the menu as specified in the documentation (http://kriesi.at/documentation/enfold/hide-menu-itemselements-on-mobile/).
    This only happens in the new mobile main menu (the secondary and footer menus still shows CSS classes).

    My solution is:
    Instead of identifying menu elements by CSS Classes, is possible to identify them using the “link Relationship (XFN)” field in the WordPress Menus settings (http://i.imgur.com/eUFRNVW.png). This gives a “rel” attribute to the menu element (including in the mobile menu). If I put “hidemb” in that field, I can use the following CSS Code to hide the elements I want in the mobile version:

    @media only screen and (max-width: 989px) {
    .hide-on-mobile { display: none !important; }
    [rel=hidemb] { display: none !important; }
    }
    

    (I still use the .hide-on-mobile because the CSS class still works for the secondary menu)
    (When I’m talking about menu elements, I mean about the pages.)

    I post this in case someone is having the same problem.

    This means that the documentation article I mentioned before should be updated, or have a different solution for this. Using the XFN field should not be the final solution for this.
    Please, consider to make CSS classes apply again in the mobile menu. And to put back again the option to select when does the mobile menu appears (mobile or mobile & tablet).

    Thank you.

    #821468

    Hi,

    I’m glad you were able to find a solution. I will keep this thread open for a little while in case you find you still need help in this area. I will also check in with the developers on this topic to see if anything further can be done.

    Best regards,
    Jordan Shannon

    #825139

    Certainly an interesting fix. But this is clearly a bug that needs fixing. The new mobile menu simply ignores custom classes.

    #827496

    Hi,

    The issues with the mobile menu have been reported, and hopefully we see an update soon.

    Best regards,
    Jordan Shannon

    #871597

    Is it Fixed ? .. it dont works on my Menu …

    • This reply was modified 7 years, 1 month ago by agentureins.
    #871760

    Hi,

    Are you using the latest version of Enfold. Though I do not believe the issue has been addressed yet.

    Best regards,
    Jordan Shannon

    #876190

    I face the same prob.
    please head to link and you’ll see all items twice.

    i have used
    /*Show only in mobile or desktop*/

    @media only screen and (min-width: 769px) {
    .only_mobile { display: none !important; }
    [rel=hidemb] { display: none !important; }}

    @media only screen and (max-width: 768px) {
    .only_desktop { display: none !important; }
    [rel=hidemb] { display: none !important; }}

    and set classes to menu, but it won’t work as promised ….
    why isn’t there a simple option to set a diff. mobile menu as in other themes? enfold is my all time fav but thats a tricky thing and hopefully simply a bug.
    thx for a quick hint

    Edit. meanwhile i solved that with https://kriesi.at/support/topic/different-menu-on-mobile-to-desktop/

    #876727

    Hello,

    I have the same problem after the update. Before, i used “.hide-on-mobile”.

    Now works only with taking the ID from main menu and creating classes. If you have a large menu it’s difficult to do.

    Can you hide via menu, like before, with the custom class?

    #877313

    Hi,

    The custom css class attribute of the menu items are not included in the mobile menu markup but we’re going to release a patch that is going to fix the issue. For now, please use the nth child selector to hide specific menu items on mobile view.

    Best regards,
    Ismael

    #914889

    Hello,

    as far as I see it is still not possible to give classes for menu items?
    Or one has to activate something to see the field for custom classes in menus?

    Regards

    #915173

    Hi med,

    It should be possible if you are running the latest version of the theme, if you can’t see the field for CSS classes then please open Screen options in the top right hand corner of the screen and select to show it there.

    Best regards,
    Rikard

    #915420

    Thanks Rikard, it was Screen Options.

    #915480

    Hi med,

    You should be able to enable custom classes. I have them on my installation as below
    Image 2018-02-21 at 21.00.58.png
    Image 2018-02-21 at 21.01.22.png

    Best regards,
    Victoria

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