Posts for the Tag: functions.php
-
Keep WordPress from Compressing JPGs
A little known WordPress feature is WordPress’ image compression. While this is a handy feature to help increase the speed of your website, not all website owners want their images compressed – like photographers for example. Thankfully, turning off this feature is quick and easy. Simply add the following to your WordPress theme’s functions.php file. add_filter(’jpeg_quality’, Continue Reading »
-
How to Add Links to WordPress 3.3′s Admin Bar
One of the great additions to WordPress 3.3 is the updated admin bar. Not only does the admin bar add some nifty quick links – but you and plugins can add links of your own to it. It’s pretty simple and straightforward. How to Add a Single Link to the WordPress Admin Bar <?php add_action(’admin_bar_menu’, ‘add_toolbar_items’, Continue Reading »
-
How to Add Custom Alerts to a WordPress Dashboard
There are many different ways to reach out to your users – email newsletter, Facebook, Twitter, Google+, etc. The problem with these communication mediums is that users must opt in to receive these notifications. With this simple code snippet you can now place alerts in the WordPress dashboard without your users opting in to receive notifications. Continue Reading »
-
WordPress Easter Egg
The creators of WordPress, Automattic, really are a fantastic group who not only made the greatest CMS currently available, they also take time to have a little fun. This is evident by this WordPress Easter Egg. What’s an Easter Egg? Well, aside from those plastic eggs filled with delicous chocolate, an Easter Egg is an Continue Reading »
-
How to Disable Theme Switching from the WordPress Dashboard
Sometimes clients can mess with or even break their WordPress site. One of the ways they’ll do this is by changing their WordPress theme – this can easily be prevented with a little PHP. How to Disable WordPress Theme Switching Paste the following code in your WordPress Theme’s functions.php to completely disable WordPress theme switching Continue Reading »
-
How to Disable WordPress Plugin Deactivation
Just like how clients can mess up their WordPress site by changing the theme (Learn how to Disable Theme Switching), clients can, and will, mess up their site by deactivating plugins. This problem can be easily averted by disabling the ability to deactivate WordPress Plugins. How to Stop Users from Deactivating WordPress Plugins Place the Continue Reading »
-
LifeGuard Assistant Plugin
We’ve had the LifeGuard Assistant for Developers available as a way for WordPress developers and WordPress theme authors to make some extra money on their work. This tool is especially handy for WordPress theme developers – an extra $8.70 off each theme would be a welcome income increase for any theme author. In an effort Continue Reading »
-
Day 22: 7 Code Snippets to Improve WordPress Security
There are many different ways to improve WordPress Security and we’ve talked about some of them. Here are some WordPress code snippets that will help improve your WordPress website’s security. Prevent the Login Info From Being Displayed Place the following in your WordPress theme’s functions.php file to prevent users from seeing the log-in error messages. Continue Reading »
-
How to Remove, Move, or Style the WordPress Admin Bar
The WordPress Admin Bar in action. While WordPress’ Admin Bar can be extremely useful for some users, not everyone likes it and some sites don’t need it. For example, wpLifeGuard is run by WordPress and members have their own WordPress accounts, however the WordPress Admin bar would not be beneficial for them, so we disabled Continue Reading »
-
The Correct Way to Remove the WordPress Version to Increase Security
What a WordPress version number looks like on a live WordPress site. On a default WordPress install, WordPress automatically outputs the current WordPress version number into the “<head>” of your website in what’s called a “meta” tag. While this is helpful for various statistics, it can create a security risk to your WordPress site. If Continue Reading »


