Blog Archives

Identify Mobile / Tablet / Desktop Using Screen-size in CSS

Add these to your CSS stylesheet as necessary. CSS to be used only on Mobile devices This CSS will be used when the screen width is less than 576px. @media screen and (max-width: 576px) {   .selector {     property: value;   }

Posted in WordPress Tagged with: ,

Hidden Background Music Using HTML5 Audio

Add this to the footer of your page before the closing </body> <audio style="display:none;" src="<?php echo CPM_BASE_PATH; ?>assets/audio/bg-music.mp3" loop autoplay></audio> For more details, refer the HTML5 Audio guide.

Posted in WordPress Tagged with:

Enable Debug Logging In WordPress

Add this to wp-config.php define(‘WP_DEBUG’, true);    // Enable WP_DEBUG mode define( ‘WP_DEBUG_LOG’, true );  // Enable Debug logging to the /wp-content/debug.log file The log file will be available at /wp-content/debug.log

Posted in WordPress Tagged with:

Change From Placeholder Text With jQuery

Add this to footer.php before the closing </body>. <script language=”javascript” type=”text/javascript”>  document.getElementsByName(‘es_txt_email’)[0].placeholder=’yourname@email.com’; </script> Where es_txt_email is the name if the <input>. The above script was used to change the placeholder in the Email Subscribers & Newsletters plugin.

Posted in WordPress Tagged with:

Show A Field Only When All Checkboxes Are Selected In Contact Form 7

You might want to read this post on how to conditionally display fields in Contact Form 7 plugin with simple JavaScript first to get some context. Here we are trying to display a line of text when all checkboxes are

Posted in WordPress Tagged with:
Email Stamp

Free Newsletter

Get my newest blog posts and insider tips. No more than a few emails a year.

Just enter your email address below and click Sign Up Now

Please enter all required fields
Correct invalid entries

You have Successfully Subscribed!