Read all of the other posts in our series on Creating Azure (hosted) WordPress Websites without knowing php or MySql!

These are the 12 most common customizations that we use on our WordPress websites.

1. Remove the WP logo from the Admin bar
2. Replace ‘Howdy’ on the Admin bar to ‘Logged in as’
3. Remove the WP Admin Bar and Personal Tool Bar access to Subscribers
4. Disable all automatic theme updates
5. Disable all automatic plugin updates
6. Disable WordPress core Major and Development Updates
7. Customize the WP Login Page
8. Remove the ‘Powered by WordPress’ in the Footer
9. Remove the WP Title’s Tagline ‘Just another WP Site’
10. Set Permalinks to display the post name
11. Set the Time Zone
12. Add custom CSS for Tables to the Child-Theme’s style.css file

Some customizations are able to be done within the WP Admin console. Other customizations use easy cut/paste of code into the child-theme’s functions.php file; some changes, such as replacing the WP login page with a customized branded login page, require the use of a plugin, and other customizations we can do easily via our Theme’s customization features. Certainly, all these changes can be done using code, but we go for the easiest, most efficient and least resource cost methods!

We prefer hiding the fact that our websites are using the WP platform information. To have our websites display our own company branding and professionalism, we remove as much of the generic pre-packaged default WordPress branding as can be accomplished, quickly and easily. We want a website’s branding to be our own, or our client’s, not from WordPress defaults. This is also done using simple copy/paste of code into the child-theme’s functions.php file, accessible via Azure Kudu UI.

Because we have experienced occasional front and back end website functionality failures after automatic updates to the WordPress core, theme and/or plugins have taken place, we have added code that we found online, to our child-theme’s functions.php, to disable automatic updates. It does take some time monthly to test and then install updates to WP core, Theme, and plugins – but we have eliminated our public and private websites failing due to automatic update conflicts.

How to Access the Azure Kudu UI to access the necessary WP infrastructure files to edit.

12 Easy Customizations!

Following are the 12 branding clean-ups we do to each of our websites. This provided code is pasted into the functions.php file or wp-config.php file and Saved.

Before: Screen shots before any changes to the Child-Theme’s functions.php file and the WP Admin Bar:

1. Remove the WP logo from the Admin bar

/*Remove WordPress logo from admin bar*/
add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );
function remove_wp_logo( $wp_admin_bar ) { $wp_admin_bar->remove_node( 'wp-logo' ); } 

After: Code added and website refreshed:

2. Replace ‘Howdy’ on the Admin bar to ‘Logged in as’

// replace WordPress ‘Howdy’ with ‘Logged in as’
function replace_howdy( $wp_admin_bar ) {
$my_account=$wp_admin_bar->get_node('my-account');
$newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $newtitle,
) );
}
add_filter( 'admin_bar_menu', 'replace_howdy',25 );

After: Code added and website refreshed:

3. Remove the WP Admin Bar and Personal Tool Bar access to Subscribers

With private or public access Support and Knowledge Base websites, not having the distracting black WP Admin Bar and the personal Tool Bar accessible to Subscribers and Authors, if necessary, reduces confusion to users and maintains the consistent branded UI experience.
The following code pasted into the child-theme’s functions.php file will remove the black WP Admin Bar.
//Hide Admin bar for Subscribers and Authors
function hide_admin_bar( $show ) {
if ( current_user_can( 'subscriber' ) || current_user_can( 'author' ) ) :
return false;
endif;
return $show;
}
add_filter( 'show_admin_bar', 'hide_admin_bar' );

Before code is added, a logged-in Subscriber would see the WP Admin bar running across the top of every website page, and clicking on the site name in the top left, would open the personal tool bar:

After code is added, the WP Admin Bar is absent to Subscribers:

An administrator to the website can login as the Subscriber and unselect and save the option to make the WP Personal Tool Bar not shown on the Subscriber’s public UI pages. However, when the Subscriber logs in, the Profile Page will still be accessible. We install a plugin, Remove Dashboard Access, to block access to the Profile page and Dashboard for any Subscriber login. The Subscriber will then be directed immediately to the Home page of the website instead.

4. Disable all automatic theme updates

Copy/paste and save the following filter into the child-theme’s functions.php file
//Disable all automatic theme updates
add_filter( 'auto_update_theme', '__return_false' );

5. Disable all automatic plugin updates

Copy/paste and save the following filter into the child-theme’s functions.php file
//Disable all automatic plugin updates
add_filter( 'auto_update_plugin', '__return_false' );

6. Disable WordPress core Major and Development Updates

Because some major WP core updates have caused plugins to fail, resulting in unexpected website failure, we also disable major WP updates. We prefer to test the updates first on the dev site before doing this on a production website. We paste code into the wp-config.php file, which is found in the wwwroot of the website, via Kudu:

Before making any changes to the wp-config.php file, it is a best practice to download a local copy of the file as a backup precaution.
Open the wp-config.php, via edit > copy/paste and save these changes:
//Disable only major and development updates
define( 'WP_AUTO_UPDATE_CORE', minor );

7. Customize the WP Login Page

There is no good reason to use the WP Login screen if anyone other than the website administrator is logging in. Make it your own. There are many free plugins available to create unique, brand specific login screens. We use the plugin Customize WordPress Login Page to create a branded login page instead of using the WP Login screen.
Before – WP default Login page:

After: An Example of a customized Login Page:

8. Remove the ‘Powered by WordPress’ in the Footer

We use the Divi Theme’s Customization Options to put our own text and menus if desired, in the website footer. An online search will give you options for how to do this in the theme that you use, or by using a plugin designed for this if you don’t want to change the footer.php code.

9. Remove the WP Title’s Tagline ‘Just another WP Site

We use the Divi Theme’s Customization Options panel to add our own tagline text, instead of the WordPress “Just another WordPress Site’.
Within WordPress go to the Admin Screen > Dashboard > Settings > General > Tagline > Add preferred tagline > Save Changes. Even if your website’s theme doesn’t use a tagline, whatever text that is entered in WPs Tagline setting will still show up on the browser tab – so it is best to add your own text!

10. Set Permalinks to display the post name

We set WP Permalinks to “Post Name” so that all page and post generated URLs have the title of the page or post: Dashboard > Settings > Permalinks > Post name > Save Changes
Note that the page’s hierarchecal path is automatically displayed in the following URL:

Note also that a post’s title will be automatically displayed since there is no hierarchical organization structure of posts as a WP default:

11. Set the Time Zone

Dashboard > Settings > General > Timezone > Save Changes

12. Add custom CSS for Tables to the Child-Theme’s style.css file

To add alternate line shading to tables, open the Child-Theme’s style.css and paste in the following code:
tr:nth-child(even) {background-color: #f2f2f2}
table {
border-collapse: collapse;
}
table, th, td {
border: 1px solid black;
}
NOTE: When using the Divi theme, just copy/paste this into the Theme Options > Additional CSS box and it will persist even with theme updates.

Before: Table with no alternate line shading:

After: CSS added to style.css – alternate line shading makes it easier to read tables

Read all of the other posts in our series on Creating Azure (hosted) WordPress Websites without knowing php or MySql!