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. …


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 …


Fast WordPress Debugging (Debug to console)

A fast way to debug that I use to debug in WordPress, In fact I got used to it so much that I use it on any PHP environment or framework that i work on. The method is debugging php variables and arrays to the console (the browser console) and will print out at …


WordPress – Get a List of All User Roles (Existing on the Site)

# WordPress – Get a list of all user roles (existing in the site) sometimes you need to see all of the user roles in your website, to do that Add this in functions.php: function get_editable_roles() { global $wp_roles; $all_roles = $wp_roles->roles; $editable_roles = apply_filters(‘editable_roles’, $all_roles); return $editable_roles; } Now, on some page of …