Deprecated!
Since the Kratos theme I am using for this site uses a custom version of jQuery, it breaks some of the plugins that use the default jQuery that comes with WordPress which is in no conflict mode (must be invoked by jQuery(...)
instead of $(...)
). Below is an ugly workaround that seems to work. This is a record of the modifications I made to the theme files for later reference.
header.php
:- line 22:
- from
- to
- from
- line 22:
inc/theme-core.php
:- line 72:
- from
wp_enqueue_script('kratos', ASSET_PATH . '/assets/js/kratos.min.js', array(), THEME_VERSION, true);
- to
wp_enqueue_script('kratos', 'https://lirc572.com/wp-content/themes/kratos-3.2.3' . '/assets/js/kratos.js', array(), THEME_VERSION, true);
- from
- line 72:
assets/js/kratos.js
:- line 5:
- from
(function () {
- to
(function ($) {
- from
- line 191:
- from
})();
- to
})(jQuery);
- from
- line 5:
Another problem with the theme is that it breaks all words in post content by default (so that English words at the end of lines can be separated in the middle). Below are the modifications to avoid this behaviour:
inc/theme-core.php
:- line 72:
- from
wp_enqueue_style('kratos', ASSET_PATH . '/assets/css/kratos.min.css', array(), THEME_VERSION);
- to
wp_enqueue_style('kratos', 'https://lirc572.com/wp-content/themes/kratos-3.2.3' . '/assets/css/kratos.css', array(), THEME_VERSION);
- from
- line 72:
assets/css/kratos.css
:- line 819:
- from
word-break: break-all;
- to
word-break: normal;
- from
- line 889:
- from
word-break: break-all;
- to
word-break: normal;
- from
- line 988:
- from
word-break: break-all;
- to
word-break: normal;
- from
- line 1091:
- from
word-break: break-all;
- to
word-break: normal;
- from
- line 819:
Comments
The
word-break
issue will probably be fixed in Kratos v3.2.4.The jQuery problem may alternatively be solved by changing the tag cloud plugin to call
tagcloud_js_init
withwp_footer
hook instead ofwp_header
.