Home Forums WoodMart support forum WHERE IS IT TO ADD A CLOSE BUTTON IN THE MOBILE MENU?

WHERE IS IT TO ADD A CLOSE BUTTON IN THE MOBILE MENU?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #232267

    pepelu
    Participant

    Dear Friends,
    I need the mobile menu to have a close button because in very low resolutions, it occupies the entire screen and when it opens, there is no close button and I cannot close it.
    This is vital for me because all the important themes have it.

    Please answer all my questions in order:
    How can I add a close button to the mobile menu?
    If this option does not exist, please, could you tell me what php code to add to functions.php to achieve this?

    It is vital for me
    Thank you so much

    #232494

    Artem Temos
    Keymaster

    Hello,

    Add the following code to the file woodmart/inc/template-tags.php http://prntscr.com/uxid83

    echo '<div class="widget-heading"><a href="#" class="close-side-widget wd-cross-button wd-with-text-left"></a></div>';

    and put this code to the custom JS section on document ready in Theme Settings

    jQuery('.mobile-nav .close-side-widget').on('click', function(){
    	jQuery('.mobile-nav').removeClass('act-mobile-menu');
    	jQuery('.woodmart-close-side').removeClass('woodmart-close-side-opened');
    	jQuery('.mobile-nav .searchform input[type=text]').blur();
    });

    Regards

    #232635

    pepelu
    Participant

    Dear Friend, Why don’t you include this in your next update? Every time I update, I should put this back in the .php file

    Likewise, I am going to create the best online dropshipping and ecommerce digital course for more than 1000 students, and I am thinking of recommending your theme, but I cannot be telling students to place this code every time they update the theme, understand?

    This would be crazy!

    #232640

    Artem Temos
    Keymaster

    We will consider adding this in our future updates but can’t guarantee that it will be implemented very soon.

    #232641

    pepelu
    Participant

    Dear Friend, Your code does not work, I have followed your instructions perfectly, and this does not close the menu. You can see it here: https://joseldiaz.com/sli/

    Could you tell me the correct code?

    And also, Why don’t you include this in your next update? Every time I update, I should put this back in the .php file

    Likewise, I am going to create the best online dropshipping and ecommerce digital course for more than 1000 students, and I am thinking of recommending your theme, but I cannot be telling students to place this code every time they update the theme, understand?

    This would be crazy!

    #232642

    Artem Temos
    Keymaster

    We see that you have added some wrong JS code that breaks other scripts on your website https://gyazo.com/db4acce36939e842d33481d8d3c5633d

    #232658

    pepelu
    Participant

    Dear Friend, I have not added any of that !!! I have only added the piece of code that you have given me.
    Maybe your code has created a conflict in another line above !!

    Do you think I know something about php?

    How can you think that I have added that to the template and accuse me of it?

    Can you tell me how to fix it completely?

    #232663

    Artem Temos
    Keymaster

    We don’t know who added that code but it causes JS errors on your website. You need to remove it from the custom JS section or whatever else you have it.

    #232683

    pepelu
    Participant

    Excuse me dear friend, now I understood that you were referring to the code inserted in custom JS and not to the code of a .php template when I saw the row with number 7485

    Now I could see a code inserted in custom JS, and that code was perhaps added by my partner who was looking at some parallax options, but I did not think that he would add any code or that he would know how to do this.

    Thanks for telling me better, now it works perfectly. But could you tell me how to add a text to the left of the close icon with the word “CLOSE”?

    This would be perfect.

    I really appreciate your support system, you really are fantastic and I am very happy, and I will recommend your theme.

    Thank you very much my dear support friends

    #232686

    pepelu
    Participant

    I already managed to put the word CLOSE

    Thank you very much for your great help and service

    #232802

    Artem Temos
    Keymaster

    Great, we are glad that you sorted it out!

Viewing 11 posts - 1 through 11 (of 11 total)