Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @petitchampagne,

    To help you with your theme concern, can you please do some basic troubleshooting first:

    a. Clear your site cache.
    b. Check for plugin incompatibility by disabling your plugins one-by-one.
    c. Make sure all plugins and your WordPress core are updated.

    If the issue persists, I recommend contacting the theme developer or posting this in their support forum here: https://www.ads-software.com/support/theme/sydney/

    Best regards,
    Niko

    You are trying to force mobile nav on desktop, and your JS code is no longer working in correct order. You need to remove this old code:

    And use this instead:

    (function ($) {
        $(window).on('load', function () {
            $('#masthead .btn-menu').on('mousedown', function () {
                let $mainNav = $('.mainnav');
                if ($mainNav.attr('id') !== 'mainnav-mobi') { $mainNav.attr('id', 'mainnav-mobi'); }
            });
        });
    })(jQuery);

    I didn’t notice any issues with the Gallery, so I can’t comment on that.

    Thread Starter petitchampagne

    (@petitchampagne)

    Thank you Ashutosh. Where will I find that please and in the image you sent at the top of the highlighted box is the line that starts Custom Javascript, do I delete that as well please?

    @petitchampagne based on what I can see on the frontend, your site looks to be using TC Custom JavaScript plugin. And based on the plugin’s screenshot, you should go to your WP Dashboard ? Appearance ? Custom JavaScript.

    Make sure to copy the existing code (that I showed in my previous comment using a screenshot), and keep it in a normal text file (.txt) as a backup. And then replace the entire code there with the one that I provided.

    Thread Starter petitchampagne

    (@petitchampagne)

    I did as you said and saved it in a text file and get this error when I upload your text

    403 Forbidden

    A potentially unsafe operation has been detected in your request to this site.

    Generated by Wordfence at Tue, 19 Dec 2023 10:15:35 GMT.
    Your computer’s time: Tue, 19 Dec 2023 09:16:38 GMT.

    Wordfence has blocked you from saving the JavaScript. You need to whitelist this action, or temporarily disable the plugin, save the changes, and then re-enable it.

    To whitelist the action, I believe you need to switch to Learning Mode, and then when WF blocks the request, you should see an option to whitelist or allow the request. Afterward, make sure to switch back to the normal mode.

    Thread Starter petitchampagne

    (@petitchampagne)

    That fixed it thank you! Wordfence was deactivated so I updated and activated it and it worked. Thank you so much for your help, I was really worried! I made the site several years ago and can hardly remember what I did!

    It is not working properly, menu won’t close when you click on the icon again. I checked your theme’s JS, and they are only attaching event listener when the screen width is less than 1025px wide.

    Use the following JS to fix this problem:

    (function ($) {
        function customHandleSubMenu(e) {
            e.preventDefault();
            $(this).siblings('.mainnav').toggleClass('toggled');
        }
        function resizeHandler() {
            if (window.matchMedia('(max-width: 1024px)').matches) {
                $('#masthead .mainnav').removeClass('toggled');
                $('#masthead .btn-menu').off('click', customHandleSubMenu);
                $(window).off('resize', resizeHandler);
            }
        }
        $(document).on('ready', function () {
            $('#masthead .btn-menu').on('mousedown', function () {
                let $mainNav = $('#masthead .mainnav');
                if ($mainNav.attr('id') !== 'mainnav-mobi') { $mainNav.attr('id', 'mainnav-mobi'); }
            }).on('click', customHandleSubMenu);
            $('#masthead .mainnav').addClass('syd-hidden');
        });
        $(window).on('resize', resizeHandler);
    })(jQuery);
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Sydney problems after update’ is closed to new replies.