Author: Support Admin

Change From Placeholder Text With jQuery
[ad_1] 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=”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. [ad_2]

Enable Debug Logging In WordPress
[ad_1] 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…

Limit The Post Title in WordPress by Word Count
[ad_1] This is not a function that you would need to use on daily basis, but I came across a reason to use it recently on a project and I thought it might be a good idea to share it here too. All it does is limit the post title by the number of words,…

Hidden Background Music Using HTML5 Audio
[ad_1] By OutsourcedContent — on October 19, 2017 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. [ad_2]

Identify Mobile / Tablet / Desktop Using Screen-size in CSS
[ad_1] 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…

Add Odd And Even Class to WordPress Posts
[ad_1] Often when designing a WordPress theme, designers choose to have different styling for odd/even comments. But recently while working on a project, I required to style odd and even blog posts differently. To do this, I needed to add odd and even class to WordPress posts. While searching for a solution, I found many…

Translate WordPress Programmatically With Gettext (Without .PO/.MO)
[ad_1] 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…

Load Bootstrap 4 CSS And JS From MaxCDN – The Right Way
[ad_1] By OutsourcedContent — on October 25, 2017 Add this to the functions.php of the active theme. /** * Load Bootstrap CSS and JS from MaxCDN – the right way * * @refer https://millionclues.com/wordpress-tips/load-css-and-js-the-right-way/ */ function mcabl1226_load_css_and_js() { // Load Boostrap CSS wp_enqueue_style( ‘bootstrap-css’, ‘https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css’ ); // Load Theme’s style.css wp_enqueue_style( ‘style’, get_stylesheet_uri() ); …

Automatically Delete Users After 7 Days In WordPress
[ad_1] This is not the type of function you would require to use very often because it offers very specific feature toautomatically delete users after predefined time. I was looking to implement this feature in a past project where my client was offering temporary access to a section on his website to many users, but…

A Bookmarklet To Load WordPress Dashboard For Any Website
[ad_1] Divi is a WordPress theme that web designers do not want you to know. It comes with a drag-and-drop theme builder. You can build beautiful looking unique websites without touching a line of code. Just choose from one of the many pre-made layouts, or pick elements and arrange them any way you like. Divi…