rsquared300
Forum Replies Created
-
Thanks.
Forum: Themes and Templates
In reply to: [Twenty Nineteen] dequeue parent theme script in child theme“touch-keyboard-navigation” is the wrong slug.
On line 226 of functions.php in Twentynineteen:
wp_enqueue_script( ‘twentynineteen-touch-navigation‘, get_theme_file_uri( ‘/js/touch-keyboard-navigation.js’ ), array(), ‘1.1’, true );
Understanding that the twentynineteen theme only enqueues touch navigation if there’s a menu assigned to Primary (menu-1), you could unregister this menu and register your own to eliminate touch navigation.
For sake of simply dequeuing the script outright, in addition to using ‘wp_enqueue_scripts’ instead of ‘wp_print_scripts’, this should work:
//Dequeue JavaScripts function project_dequeue_unnecessary_scripts() { wp_dequeue_script( 'twentynineteen-touch-navigation' ); } add_action( ‘wp_enqueue_scripts’, ‘project_dequeue_unnecessary_scripts’, 999 );Forum: Plugins
In reply to: [Translate WordPress - Google Language Translator] Use American FlagYou can do this simply with some custom CSS. The flag already exists, and you can simply shift the sprite location over one.
Go to Settings -> Google Translate Plugin -> Add CSS Styles, and add the following CSS depending on the Flag size you’re using.
24px
#flags.size24 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags.png") no-repeat scroll -117px -351px rgba(0, 0, 0, 0); }22px
#flags.size22 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags22.png") no-repeat scroll -117px -351px rgba(0, 0, 0, 0); }20px
#flags.size20 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags20.png") no-repeat scroll -118px -352px rgba(0, 0, 0, 0); }18px
#flags.size18 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags18.png") no-repeat scroll -119px -352px rgba(0, 0, 0, 0); }16px
#flags.size16 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags16.png") no-repeat scroll -120px -353px rgba(0, 0, 0, 0); }You can do this simply with some custom CSS. The flag already exists, and you can simply shift the sprite location over one.
Go to Settings -> Google Translate Plugin -> Add CSS Styles, and add the following CSS depending on the Flag size you’re using.
24px
#flags.size24 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags.png") no-repeat scroll -117px -351px rgba(0, 0, 0, 0); }22px
#flags.size22 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags22.png") no-repeat scroll -117px -351px rgba(0, 0, 0, 0); }20px
#flags.size20 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags20.png") no-repeat scroll -118px -352px rgba(0, 0, 0, 0); }18px
#flags.size18 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags18.png") no-repeat scroll -119px -352px rgba(0, 0, 0, 0); }16px
#flags.size16 a[title="English"], .tool-container .tool-items a[title="English"] { background: url("/wp-content/plugins/google-language-translator/images/flags16.png") no-repeat scroll -120px -353px rgba(0, 0, 0, 0); }