Hello again guys
Before we start I’d like to explain thay my JS knowledge is nonexistent.
But to the subject. I have this code in my Customizer > Custom JS:
jQuery(function($){
$(".widget.widget_my_keywords_widget ul").text(function () {
return $(this).text().replace(“no terms found for this post”, “Ten artykuł nie zawiera przypisów.”);
});
$(".csl-entry.hanging-indent").text(function () {
return $(this).text().replace(“Retrieved from”, “Pozyskane z”);
});
});
jQuery(‘document’).ready(function($){
$(".x-sidebar .widget .h-widget").css(“background-color”, “”);
});
First two replace certain strings hardcoded into plugins that I use and third is (temporarily) a placeholder for changing inline !important styles that some plugin makers decided to use (nonsense I know).
Anyway, everything works fine as it is thanks to some kind people who gave me snippets to do those things.
BUT
I’d like to keep this code in my child theme instead of a customizer. I created scripts.js file in my child theme folder (next to functions.php and style.css so all custom stuff is in the same place) and copy-pasted that exact code from my customizer there. Now how do I make it work (preferably exactly the same way it worked in the customizer)?
P.S. How can I use code-block on new forums? I can’t find option for that and using blockquote instead is ugly…