Code Samples

October 20, 2021
Hide a WP user account

Basically hides a user account unless you're the user account. Used on a project where I had to allow other Admin users, but I didn't […]

October 20, 2021
Remove User Roles from WP

Sometimes you just don't want to see a bunch of user roles. This will help.

October 20, 2021
Add Custom CSS to WP Dashboard

Sometimes you just need to change some styles in the Dashboard. I recently needed to remove something from a plugin that was redundant with the […]

October 20, 2021
Custom message on WP login page

Sometimes you just need to tell people something before they log in. Like, if your name is Pat Griffin, you're not allowed. (Pat Griffin is […]

October 20, 2021
Change WP role names

I had a project recently where I just didn't want the same old "Subscriber", "Author", "Editor" roles. So, I used this. It basically just changes […]

October 20, 2021
Custom Login Screen Logo

Sometimes you just want to change the logo on the WordPress login screen. There are plugins for this, but they usually do a number of […]

October 20, 2021
Set the first image in a WP post to the Featured Image if a Featured Image hasn't been set

This snippet automatically sets the featured image by fetching the first image of the WordPress post. *Note – if you choose a featured image, that […]

October 20, 2021
Add User to WordPress DB with SQL

This will add an admin account to the WordPress database. To do so, you have to be able to run SQL against the database server, […]

October 20, 2021
Add Custom Message to WordPress Login Page
©2021 Fotan Web Design