Loading IE Conditional Stylesheets in WordPress

Most web developers are familiar with the standard IE conditional comments that allow you to load a stylesheet only in Internet Explorer.  For example: View the code on Gist. Many new WordPress developers / themers tend to just hardcode these conditional comments directly into their theme’s header.php file.  This approach might work well for one-off […]

WordPress User Login Redirect

WordPress sites that offer personalized or private content typically want to keep their users on the front end of the site.  However, WordPress automatically takes users to the back end dashboard after they login.  Obviously, we need to be able to redirect these users to the front end of the site; but at the same […]

Replace the WordPress Dashboard

When it comes to customizing the WordPress dashboard, you basically have two options: Customize the widgets that appear on the WordPress dashboard by adding and removing them in the code. Completely replace the dashboard with your own custom dashboard. The first option is a great option, but the issue here is that you have no […]

WordPress User Last Login

Have you ever needed to know a WordPress user last login date?  By default, WordPress doesn’t provide any information on when a user last logged in.  However, such information is extremely useful when, for example, trying to delete inactive users or evaluate the success of a membership site. The User Meta API Thankfully, WordPress allows […]

Check If A WordPress Plugin Is Active

If you ever have to write code that is dependent on a specific plugin being active, WordPress has you covered with the is_plugin_active() function. View the code on Gist. All you need to do is pass in the plugin basename and WordPress will do the checking to see if the plugin is active. How do you get […]