Posts
How to insert Google translate into your website (WordPress)
- Get link
- X
- Other Apps
There're two important things: 1. where to insert? 2. what's the code In WordPress, find the Appearance, and then click Edit Themes, and then click the location you want to insert. for example: insert the language translate at the Footer. the codes as below: <div id="google_translate_element"></div> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: ' zh-TW '}, 'google_translate_element'); } </script> <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> then click update now. you will get a dropdown list at the left bottom. Tips: The yellowhight zh-TW code is your default language of your website, I am using TaiWan Chinese codes. yours maybe different.
How to Install a WordPress Plugin (3 Different Methods)
- Get link
- X
- Other Apps
WordPress Theme Development From Scratch - 3. Enqueuing CSS and JS to W...
- Get link
- X
- Other Apps
full screen view: https://youtu.be/KtMwTBl-j8I functions.php file: <?php // Create the function function load_css () { // Register the style wp_register_style( ' my-style ', get_template_directory_uri() . ' /style.css ', array(), false, 'all' ); // Name, get template URL + CSS filename, dependencies, version number, media // Enqueue the style wp_enqueue_style('my-style'); } // Execute the function add_action('wp_enqueue_scripts', 'load_css'); Yellow hight portion can be customized. 'my-style' string name, could be any. '/style.css' string location, could be /css/style.css. depend on your style.css file location. *link functions file with pages, still need some work: 1. add <?PHP wp_head(); ?> right beyond the end of </head> in the single.php file(similar as HTML file) <?php wp_head (); ? > </ head > < body <?php body_class (); ? > id = "top" > <?p...