PHP Include And Require Files In WordPress functions.php – The Right Way

PHP Include And Require Files In WordPress functions.php – The Right Way

By OutsourcedContent — on October 10, 2017 /** * Include File In WordPress Theme’s Functions.php *   * @since 1.0 * @refer https://millionclues.com/wordpress-tips/php-include-and-require-wordpress/ */ include_once( dirname(__FILE__) . ‘/includes/simple-post-likes/post-like.php’);

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

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

By OutsourcedContent — on October 12, 2017 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 checked. Here is the result. Here is the…

Change From Placeholder Text With jQuery

Change From Placeholder Text With jQuery

By OutsourcedContent — on October 13, 2017 Add this to footer.php before the closing </body>. <script language=”javascript” type=”text/javascript”>  document.getElementsByName(‘es_txt_email’)[0].placeholder=”[email protected]”; </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.

Enable Debug Logging In WordPress

Enable Debug Logging In WordPress

By OutsourcedContent — on October 16, 2017 Add this to wp-config.php define(‘WP_DEBUG’, true);    // Enable WP_DEBUG mode define( ‘WP_DEBUG_DISPLAY’, false );  // Hide errors from browser. Set to true if you want to see errors in browsers as well. define( ‘WP_DEBUG_LOG’, true );  // Enable Debug logging to the /wp-content/debug.log file The log file will be available at…

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

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

By OutsourcedContent — on October 20, 2017 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;   } } CSS to be used on anything BUT…

Translate WordPress Programmatically With Gettext (Without .PO/.MO)

Translate WordPress Programmatically With Gettext (Without .PO/.MO)

By OutsourcedContent — on October 23, 2017 Add this to the functions.php of your theme. This example is to be used with my Ask Me Anything (Anonymously) WordPress plugin. To use it with other themes and plugins, change the text domain of the theme or plugin in the highlighted areas. /** * Translate text strings…