WordPress – How to disable dashboard access to subscribers

Control Dashboard Access
Photo credit – declanjewell2472470758

For security reasons you may wish to disable dashboard access to subscribers and allow access to only Admins, Editors and Authors.

Below is a simple snippet of code to achieve this. Add below code in your theme’s functions.php file

The above code will redirect the user to your home page when the user tries to visit the Dashboard.

However in some cases you may want a certain subscriber to access Dashboard. In that case I have created a capability called as dashboard_access. This capability can be assigned to the required user.

WordPress how to assign only necessary capabilities to users

Quite often there is a requirement in wordpress to give certain users access to certain Administrative function e.g. manage widgets but you do not want to make them administrator for obvious reasons

Here are some steps to achieve this requirement

  1. Create some role e.g. widgets_manager (based on the Author role i.e. same as Author role)
  2. Assign edit_theme_options capability to this newly created role
  3. Now just add below code to your functions.php


Feedburner subscription – How to add to my wordpress site

Feedburner subscription form is a nice and easy way to help your readers with an automated email subscription facility which includes your latest posts. Here are the steps to add this facility on your wordpress site.

Step 1: Create a feedburner account

First of all create a feedburner account. To create an account visit http://feedburner.google.com

If you are logged into google, it will automatically create an account for you.

Step 2: Add your feed URL

Add your website feed URL in the box where it says Burn a feed right this instant and click Next

Generally it will be http://YOUR_SITE_ADDRESS/feed

feedburner burn feed

Step 3: Activate Email Subscriptions

Once the feed is created, click on the feed name.

Then click on the Publicize tab and Activate Email Subscriptions as shown below by clicking the Activate button.

This will activate Email Subscriptions i.e. automated emails to your subscribers.

Feedburner subscription

Step 4: Feedburner subscription form

Now the last thing is to create a subscription form on your website for the subscribers to register to your feed.

  1. Download the WordPress plugin Feedburner Form and Activate it
  2. This will create a Feedburner Form widget type
  3. Just add this widget to one of your sidebars and configure it as per your requirements