O'Reilly logo

WordPress 2.7 Cookbook by Jean-Baptiste Jung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a control panel to your blog's sidebar

Now that you have learned how to check whether a user is logged in or not, why not learn how to add a small control panel to your blog's sidebar that is only visible to the logged in users.

In this recipe, you'll learn how to achieve this task.

Getting ready

The upcoming piece of code works in exactly the same way as the code from the previous recipe does. It is all about checking if the user is logged in and whether he or she has the right to do a certain kind of thing.

The following screenshot shows a simple, but useful, control panel which is similar to the one we're about to create:

Getting ready

How to do it...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required