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 …


WordPress – Contact Form 7 – Dynamically Change Fields

# WordPress – Contact Form 7 – Dynamically change fields yes you can use a plugin “something cf7 dynamic fields”, but their is a better way, or at least let’s call it, my way. We can change the fields via JavaScript on document ready… First of all Give the field an id (in contact …