Today’s how to is simple enough. How to add custom widgets to the dashboard in WordPress. I’ve been building an “intranet” on the WordPress platform, which means I basically use WordPress for it’s back-end dashboard only. The widgets I have included are an “Announcements” and “Custom Form” Widget for my users. The way to add these custom widgets to the dashboard is simple. Just copy/paste this code into the functions.php file in your activated theme’s folder.
function example_dashboard_widget_function() {
// Display whatever it is you want to show
echo "Hello World, I'm a great Dashboard Widget";
}
// Create the function used in the action hook
function example_add_dashboard_widgets() {
wp_add_dashboard_widget('example_dashboard_widget', 'Example Dashboard Widget', 'example_dashboard_widget_function');
}
// Hoook into the 'wp_dashboard_setup' action to register our other functions
add_action('wp_dashboard_setup', 'example_add_dashboard_widgets' );
Pretty simple
Once I finished college and I joined the workforce, I realized very quickly that the “non-student adult” can quickly get behind on their scholastic health. I see it every day, where people not only stop trying to further their intelligence, they simply just don’t care. With the birth of my son 6 months ago it became more and more evident that I need to stay on top of my game in order to answer those 4 million questions that inevitably await. After I thought about it a bit I realized I already do a few things to “stay sharp” on a daily basis.
- Educate yourself every day in some way. This could be as simple as reading a newspaper article to blowing through a few chapters of a non-fiction book.
- Take time each day to do something outside your normal box. Instead of reading the same column you always read, do a search on a subject that you know nothing about. Every day I go to wikipedia and look up something I don’t know. This could be a random fact like “From where does the Santa Claus myth come?” or something as in-depth as “How are supernova’s formed?“
- Question something you normally would not concern yourself with. In other words, start a debate or an engaging conversation. A lot of people dismiss the idea of learning from the people around them. The guy in the cube next to you might be a car expert or a woodworking hobbyist. Take the time to ask a specific question about their area of expertise and you’d be surprised what you can learn on a daily basis.
- http://www.lumosity.com/ – Do it. Lumosity is a mix of scientifically created brain games/training. It’s a 15 minute a day brain stretcher.
- Exercise for 30 minutes. It’s been proven in a billion studies that it strengthens not only your body but your mind as well. Take 30 minutes and do SOMETHING active. It will help relieve stress, keep you in shape and make you smarter all at once. You have time. I work 60+ hours/week, have a 6 month old baby and am in the middle of structuring a start-up business. If I have time, you have time.
- Turn the sitcom off for 30 minutes and watch something on the History channel, Discovery channel or the like. Yes, watch TV.
- Take up an engaging/high learning curve new hobby such as an instrument. What I mean by this is, learn something that’s going to take years to do well and can take a lifetime to master. Taking 30-60 minutes each day to learn an instrument can be extremely beneficial. It not only teaches patience but it gets the gears moving and keeps the synapses firing information-rich neurotransmitters.
- Buy a Rosetta Stone language learning DVD set. Yes, learn a new language. These DVD’s are amazing and can teach you a language in no time. This is especially beneficial for accountants, computer programmers and those that work in the science and mathematics fields as language is an entirely different part of the brain.
- Take a class. Whether it’s a Williams Sonoma cooking class or you’re going to get your Masters, it’s never too late to take a class and be amongst peers. The second time around can be so much more beneficial because you are in a completely different state of mind than you were in your late teens/early twenties.
- Try not to stress the small stuff. Stress is proven to significantly wear your mind and your body. Do something every day to restore your balance and “Zen out”.
HTML5 is amazing in so many ways. I’m anxious to see more and more applications moving to HTML5 web versions and finally start ditching Flash, because let’s face it, the iPad is freakin sweet and I hate when I cannot view content on it. Anyway, enough of my rant. As much as I want to just ignore the fact that IE exists, I simply cannot. Why anyone would choose IE over Chrome/Firefox/Safari/Opera I have no idea, but the masses still do and I must cater to them. We all know that even with the advent of IE9 on the horizon, it will take forever for people to begin migrating away from antiquated browsers like IE7 & IE8 (I don’t even talk about 6…no I don’t support it). So how do we use those cool HTML5 elements, rock out our code and still be IE compliant? In walks Javascript with it’s chest all puffed out.
Just use an IE conditional tag and plug this badboy into the <head> section of your site:
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
There you have it!







