Monthly Archives: November 2017

Launch Bootstrap 4 Modal From WordPress Menu

Add .launch-contact-modal class to your WordPress menu item. This can be done from the admin interface Appearance > Menu. Change #contactModal in the following jQuery to the ID of your Bootstrap 4 modal. jQuery(document).ready(function($){   // Adding Bootstrap Modal to WordPress

Posted in WordPress Tagged with: , ,

Git And GitHub For Beginners

An awesome video series on Git and GitHub concepts. No coding experience required to follow.

Posted in WordPress Tagged with: ,

Add Bootstrap4 Form Styling To WooCommerce Checkout Fields

Add the following code to functions.php or to a custom plugin to style WooCommerce checkout form fields with sweet Bootstrap 4 styling. /** * Add Bootstrap form styling to WooCommerce fields * * @since  1.0 * @refer  http://bit.ly/2zWFMiq */ function iap_wc_bootstrap_form_field_args ($args,

Posted in WordPress Tagged with: , , ,

Smooth Scroll Page When Clicking Anchor Link – jQuery

Add this to your jQuery file. // Smooth scroll When Clicking Anchor // @refer https://stackoverflow.com/a/7717572/8255629 var jQueryroot = $(‘html, body’); $(‘a[href^="#"]’).click(function () {   jQueryroot.animate({     scrollTop: $( $.attr(this, ‘href’) ).offset().top   }, 1000);   return false; });

Posted in WordPress Tagged with: , ,

Sanitize And Escape Text Input In WordPress

For general sanitization of text input fields and text areas for plugin options and such, use: sanitize_text_field( string $string ) For escaping in general for text input fields, use: esc_attr( string $string ) @refer https://wordpress.stackexchange.com/a/66323/90061

Posted in WordPress Tagged with: ,