Git Error – invalid active developer path (also called, did you upgraded to macOS Sierra?)

If you are getting this error,  error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun This is because you are on a Mac, and you upgraded to macOS Sierra. To fix this, all you need to do is update/install Xcode. run this command in the terminal:   xcode-select –install Run the command, agree …


WordPress – Change User Role Name

# WordPress – Change User Role name in functions.php : function change_role_name() { global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); //You can list all currently available roles like this… // This is only for you to see whats going on, after checking, remove these 2 lines altogether $roles …


WordPress – Creating a Child Theme, The Pure Basics

# WordPress – Creating a Child Theme, the pure basics A child theme consists of at least one directory (the child theme directory) that will be placed under the themes folder and two files (style.css and functions.php), which you will need to create: This is basically all you need to create a child theme. …


JavaScript – Getting URL Parameter and setting a URL parameter (Snippet)

# Getting a URL Parameter A function that you give it the param, (url params or url args, whatever you want to call it) to find from the current url (key), and she returns the value of that parameter. var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split(‘&’), sParameterName, i; …


jQuery and General JavaScript Snippets

This will be a growing list of jQury, maybe even general JavaScript Snippets that I use a lot and always forget. # Add/Remove a class jQuery Add a class to a element jQuery(‘selector’).addClass(‘active’); Remove class from an element $( “p” ).removeClass( “myClass yourClass” ) # Find the html <a> Element with href that contain a …