Home Forums WoodMart support forum How to add a Close Button ( with a text ) like Cart Area to the mobile menu.

How to add a Close Button ( with a text ) like Cart Area to the mobile menu.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #245730

    Iustin16
    Participant

    I want to add a Close Button to the Mobile Menu in the header like the cart area.

    Attachments:
    You must be logged in to view attached files.
    #245740

    Hello,

    Unfortunately, there is no option to add such a button. The mobile menu is closed by choosing a menu item or clicking in the empty space.

    Best Regards

    #245799

    Iustin16
    Participant

    Hello.
    Thank you for your reply. Yes, I know it does cancel by clicking on the left area. The problem is there is very little space on some devices and other problem, the major problem, is that some people do not know if they click in the left area the menu is going to close. I have tested the second problem on 20 people and 6 of them did not manage to close the menu.

    Please help me to add a close button or just give me a starting point. Thank you.

    #246008

    Hello,

    To add the “Close” button there, 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">Close</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();
    });

    Best Regards

    #246012

    Iustin16
    Participant

    It works! thank you !

    #246047

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

    #246050

    Iustin16
    Participant

    I do have an offtopic question.
    When i try to edit the product description with elementor i have the following error:“Sorry, the content area was not found in your page. You must call
    the_content function in the current template, in order for Elementor to work on this page.”

    #246176

    Hello,

    It should work by default without any errors.

    Please deactivate all the plugins not related to the theme and switch to the parent theme.
    Provide your site admin access to the private area.

    Best Regards

    #248706

    Iustin16
    Participant

    It does not work

    #249138

    Hello,

    Please provide the files rout to the theme folder, when I enter the FTP I do not see the site files and folders: https://prnt.sc/vyvi23

    Best Regards

    #249143

    Iustin16
    Participant

    Try this

    #249293

    Hello,

    I am checking the file and I do not see the added code: https://prnt.sc/vz3iwr

    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">Close</a></div>';

    Best Regards

    #249325

    Iustin16
    Participant

    I mean: I do have an offtopic question.
    When i try to edit the product description with elementor i have the following error:“Sorry, the content area was not found in your page. You must call
    the_content function in the current template, in order for Elementor to work on this page.”
    Does not Work
    Try to edit a product description with elementor, won t work. It says something about theme and the_content().

    #249488

    Hello,

    We have deactivated the plugins https://prnt.sc/vzjen0 and everything works https://prnt.sc/vzjfa7

    Best Regards

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