Posts

Showing posts from July, 2019

Convert array to string comma separated in JavaScript

You can use JavaScript Array toString() Method Example:  var arrTags = ['Software Development and Engineering','Information Technology','Data Science and Analytics']; var strTags = arrTags.toString(); OutPut : Software Development and Engineering,Information Technology,Data Science and Analytics

Add and use wow.js into WordPress theme

1. Download animate.min.css and wow.min.js from github (https://github.com/daneden/animate.css) 2. Create a subfolder in your theme / child theme called css 3. Place animate.min.css there. 4. Create a subfolder in your theme / child theme called js 5. Place wow.min.js there. 6. Add the following lines to your theme / child theme's functions.php file //* Enqueue WOW.js Animate.CSS and function zeal_enqueue_scripts() { wp_enqueue_style( 'wow-css', get_template_directory_uri(). '/css/animate.min.css' ); wp_enqueue_script('wow-js',get_template_directory_uri().'/js/wow.min.js', array(), '',true); } add_action( 'wp_enqueue_scripts', 'zeal_enqueue_scripts ); 7. Add below JavaScript code before </body> tag to theme's footer.php <script type="text/javascript"> var wow = new WOW({ boxClass:     'wow',      // animated element css class (default is wow) animateClass: 'animated&#

Change text and url on wordpress admin login page

Add below code into your active theme's function.php // changing the logo link from wordpress.org to your site function admin_login_url() { return home_url(); } // changing the alt text on the logo to show your site name function admin_login_title() { return get_option('blogname'); } // calling it only on the login page add_filter('login_headerurl', 'admin_login_url'); add_filter('login_headertext', 'admin_login_title');