How to add new role in WordPress

How to add new role in wordpress add_role('customusername', __( 'customusername'), array( 'read' => true, // Allows a user to read 'create_posts' => true, // Allows user to create new posts 'edit_posts' => true, // Allows user to edit their own posts 'edit_others_posts' => true, // Allows user to edit others posts too 'publish_posts' => true,... » read more

How to create a WordPress must-use plugins or mu-plugins

How to create a WordPress Must-Use Plugins (mu-plugins) Must-Use Plugins or mu-plugins allows you to load custom functionality. The mu-plugins loads before any other regular plugins, and have not option to activate or deactivate unless removing them from the mu-plugins directory. The code in these mu-plugins will load on all the sites in a multisite... » read more

Set Primary Domain On WordPress Multisite

Set Primary Domain On WordPress Multisite Open a new terminal window on your Mac Finder > Applications > Utilities > Terminal ## Connect to your server Navigate to the local directory that contains your private KEYFILE cd ~/.ssh Log in using your private KEYFILE, USER, and SERVER-IP address ssh -i [KEYFILE] [USER]@[SERVER-IP] You will be... » read more

How To Create a WordPress Child Theme

Create Child Theme Create Child CSS File Create new file in your theme directory and name it themename-child Open that directory and create a new file called style.css Paste in the below information Update Theme Name to the Theme Child Theme` The other information can be copied over from the parent theme, you can find... » read more

Install Google Tag Manager Without a Plugin

How to add Google Tag Manager Signup OR Login to your existing Google account – Once logged in click on Create Account Fill in the details and click Create Click and agree to service agreement. Before we go ahead and copy and paste the code, in the right coner of the page there is... » read more

Hide WordPress Admin Notice

<?php /** * Plugin Name: Hide Admin Notice * Plugin URI: * Description: Hide Admin Notice * Version: 0.1 * Author: * Author URI: * License: * */ add_action('admin_enqueue_scripts', 'hidenotice_admin_theme_style'); add_action('login_enqueue_scripts', 'hidenotice_admin_theme_style'); function hidenotice_admin_theme_style() { echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none !important; }</style>'; } ?>

Create WordPress custom post type without plugin

Custom Post Types without a Plugin Create an mu-plugin directory Create a new .php file and name it something like custom-post-type.php Copy & paste the below code into the file. Insert a friendly name to identify the CPT Update the UPDATENAME sections with the name of the CPT. Read // !!! IMPORTANT !!! field if... » read more