List unused javascript for easy removal

Is there a list somewhere of what each of these WordPress related javascripts do? There is no comprehensive list that does this, and many of those items would not appear on it as they’re not WordPress internal files or may be required by non-WordPress files to function. Those files may be built to require them … Read more

Loading 2 Different Version of JS files [closed]

My only question is will this (loading 2 JS files of different versions) create any problem in any other pages? Likely. WP loads jQuery in noConflict mode, meaning it doesn’t occupy typical $ variable, but only jQuery one. However another copy of jQuery can very well get in a fight over jQuery one with the … Read more

How to implement custom URL handler to access JS modal content? [closed]

You could try with javascript, the following logic: On page load check if a hash exist in the url with something like: var hash = decodeURIComponent(location.hash.substr(1)); Then you would have two tables (one for team and one for advisors) with names matching the urls of your modals (e.g.: https://greentec-capital.com/team/peter-grouev/) like: var teamHashes = [‘peter-grouev’, ‘erick-yong’]; … Read more

Custom JS doesn’t work after 4.9.9 update [closed]

you do have your menu JS code currently 2 times on the page. in https://www.manufakturamocy.pl/mm/wp-content/cache/minify/b6a70.default.include-body.8cc603.js and in https://www.manufakturamocy.pl/mm/wp-content/themes/mmocy/js/script.js?ver=4.9.9 which causes your menu open and close in the same time. maybe a problem with your cache and JS minify plugin.

How to keep close a sub-menu under homepage? [closed]

To do that, you have to set hidden attribute to the sub menu. CSS #wrapper .fusion-vertical-menu-widget.left .menu .sub-menu { display: none; } to toggle display on the menu on hover over servizi, you can add jQuery hover to the menu item. jQuery var subMenu = jQuery(“#wrapper .fusion-vertical-menu-widget.left .menu .sub-menu”); jQuery(“#menu-item-12049”).hover(function(){ subMenu.show(); }, function(){ subMenu.hide(); }); … Read more

How could I add load more posts to my theme? [closed]

You can add a load more button using a variety of WordPress plugins, just pick one and follow the instructions. I like this one: https://wordpress.org/plugins/ajax-load-more-anything/ Yes, it is possible to add it without using the REST API but the REST API is a great use for this type of activity. To provide a concrete example … Read more

Don’t understand how to link Javascript files in WordPress

Please read this documentation https://developer.wordpress.org/reference/functions/wp_enqueue_script/ You need to set 5th parameter to true so the javascript is loaded in the footer. wp_enqueue_script( ‘tyc_scripts’, get_theme_file_uri(‘/js/tyc_scripts.js’), array(), false, true ); if the issue still persists please add your js code inside jquery document.ready()