Book Image

WordPress 3 Cookbook

By : Ric Shreves, Jean-Baptiste Jung
Book Image

WordPress 3 Cookbook

By: Ric Shreves, Jean-Baptiste Jung

Overview of this book

<p>Using the WordPress Content Management System, you can create a beautiful, dynamic, and amazing website. WordPress is a flexible and powerful tool that's ideal for creating both blog and non-blog websites. Are you feeling limited with WordPress, or are you wondering how popular blogs do a certain kind of thing that you can't?<br /><br /><i>WordPress 3 Cookbook</i> focuses on providing solutions to common WordPress problems so that you can translate your site to one of the best. The author's experience with WordPress enables him to share insights on using WordPress effectively, in a clear and friendly way, giving practical hands-on solutions to WordPress problems, questions, and common tasks &ndash; from themes to widgets and from SEO to security. <br /><br />With this update to the WordPress 2.7 cookbook, you will learn many WordPress 3 secrets and techniques, with step-by-step, useful recipes dedicated to achieving a particular goal or solving a particular problem. <br /><br />You will learn to install and customize themes, work with plugins, customize content display, enhance interactivity with the user and build communities. Then, the book also teaches you to earn revenue through online sales and advertisements. You will also find recipes for SEO and enhancing usability, and the book finally winds up with information on the inevitable maintenance and security.<br /><br />This book helps you to get solutions to common WordPress problems, to make your site better, smarter, faster, and more secure.</p>
Table of Contents (16 chapters)
WordPress 3 Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Gaining control over user roles and permissions


User permissions in WordPress are dictated by the role the user is assigned to. By default, the WordPress system includes five roles:

  • Admin

  • Editor

  • Author

  • Contributor

  • Subscriber

The permissions associated with each role are fixed and cannot be edited without the use of a plugin. While there are several plugins that provide this functionality, in this recipe we take you through using the User Role Editor and show you how to both modify existing roles and how to create new ones.

Note

To learn more about the default user roles and their capabilities, visit the WordPress Codex page on the subject at http://codex.wordpress.org/Roles_and_Capabilities

Getting ready

To execute this recipe, you will need to install the User Role Editor plugin. You will need to install this plugin before you can get started. Search for User Role Editor inside the Add New Plugins screen of your WordPress site. After you find it, click on it to install, and then activate it.

Note

You can learn more about the plugin by visiting the developer's website at http://www.shinephp.com/user-role-editor-wordpress-plugin/

How to do it...

To edit an existing role, follow these steps:

  1. Log in to your WordPress Dashboard.

  2. Click on the Users menu.

  3. Click on the options User Role Editor.

  4. On the page that loads, first select the role you wish to edit from the Select Role combo box.

  5. Make the changes you desire.

  6. Click on the Update button to save your changes.

Your changes will now impact all users assigned to the role you have edited.

Note

You cannot modify the Admin role.

To create a new role, follow these steps:

  1. Log in to your WordPress dashboard.

  2. Click on the Users menu.

  3. Click on the options User Role Editor.

  4. On the page that loads, enter a name for the new role in the Add New Rolefield.

  5. Click on the Add button.

  6. On the page that loads, select the privileges you want to role to enjoy.

  7. Click on the Update button to save your changes.

Tip

The fields marked level_x are only applicable to older, version 2 installations of WordPress and should not be used for WordPress 3. Note also that you can make the role capabilities easier to read by clicking on the check box labeled Show capabilities in human readable form, at the top right of the page.

How it works...

The plugin edits the default role settings and, by interfacing with the database, allows for creation of new roles. Those of you who wish to explore modifying roles without the use of a plugin will need to explore the WordPress Plugin API at http://codex.wordpress.org/Plugin_API

See also

  • Managing users section in this chapter

  • Setting up editorial workflow section in this chapter