chicks making sounds
04.23.2021

Button Audio Player with One Audio File

The audio player button I introduced in the following post uses two audio files in accordance with the developer's instruction. However, I feel that using only the .mp3 file might be enough (due to my laziness), and have no problems so far. So, I'd also like to share how I modified the JavaScript file so as not to cause errors. Remove or Comment Out Some Lines After downloading the fantastic JavaScript file from the developer's website, remove (or comment out) some lines as follows. // lines to remove or comment out // line 37 var setDir = './' ; // 音声ファイルがあるフォルダ(最後は[/]) // line 62 & 63 if( audio.canPlayType( 'audio/mp3' ) …

chicks making sounds
04.23.2021

WordPress: Button Audio Player Without Plugins

This post shares how to create a button that plays audio or has sound effects on click. This function is developed by Syncer.jp, who is a Japanese developer. (reference: https://syncer.jp/html5-javascript-hello-button). I am using this button especially to demonstrate pronunciations for foreign languages as in the following article (see the "Vocabulary" section). Here is another simple example: (When you click the bird icon, it sings.) This fascinating function turns Icons, images, texts, or anything into an audio button. I will walk you through how to introduce this button in WordPress. Download A JavaScript File First, we download a JavaScript file from the developer's website: https://syncer.jp/html5-javascript-hello-button#sec-5. The file is named "sounds-multi.js" and …

wordpress
02.13.2021

Customize WordPress Tag Cloud

The following codes in this memo let me get the following changes for WordPress Tag Cloud: Before After To get this tag cloud, I modified functions.php and style.css. It's often said that modifying functions.php is not a good idea, but sometimes we want to anyway. When you decide to edit your functions.php, please do that with extra caution so that you won't break your website. Hope some of the codes fit your needs. The Sections I Wanted to Change My default tag cloud was like below. the left one: called by general widget customizer the right one: called by "<?php the_widget('WP_Widget_Tag_Cloud'); ?>" So, I... unified the font-size → functions.php displayed …