The Restrictions module allows you to customize the access of fields and features so that users have an incentive to upgrade their payment plans or their listings to gain access to these fields and features.
Why should I use restrictions?
Consider these two common examples:
- Suppose you have 3 plans: Basic, Better and Best, each with a different price. You want to offer more features to a user if they pay more money for it. The Basic listings you want to have very basic features and a standard set of fields. For the Better plan, you’d like to include some contact information to display and for the Best plan, you’d like to allow access to show a Map as well as Facebook and Twitter links on their profile.
- You want to have “sticky” or “featured” listings, but instead of just allowing the listing to show at the top of the search results and be in a different color (which is the standard “featured” listing behavior), you’d like to include access to Ratings in addition, to entice people to use the Featured listing feature of your site. You'd also like to include additional fields in the featured listings so they have more information to display, making it more useful (e.g. a Logo field accessible only to Featured listings)
These are the common use cases of Restrictions. You can configure access based on the following:
- Plans
- Restrictions module
Installation
Follow the installation steps to get started.
How do I set it up?
Restrictions may seem a bit intimidating at first, but the flexibility it offers just means there are a few more settings than normal to get things configured. To restrict access to certain fields or features based on a plan, do the following:
- Setup your directory for all of the “basics”
- Set your Directory to Paid mode (typically)
- Create all of the fields you plan to use in the directory
- Create all of your plans you plan to use
- Decide how you want to assign features to the plans
- Enable restrictions
- Configure the restrictions per plan
That's it. There are some details in the last step we'll go over here, of course.
Step One: Basic Directory Setup
Typically, Restrictions are intended to offer different payments in exchange for different features. Payments implies that you want to accept money from users in this case, so it makes the most sense to create paid plans. You'll do that under Directory → Directory Content → Plans.
You also need to have all of the fields you plan to use in your directory fully created. You can do that under Directory → Directory Content → Form Fields.
Step Two: Create All Plans
First thing is to make sure you have all of your plans in place you plan to use. You can read about how to do that here. Once you have all of them created, move on to the next step (it's not super important that you have every detail of them figured out, like how long they run or how many images they have–but you need the names of all plans in the system to be able to move to the next step!)
Once you create your plans, you need to understand what the plans mean to your users. For example–if you offer 3 plans, one will be the “lowest” (cheapest with the fewest features) and one will be the “highest” (most expensive with all the features). We're going to use an example here that mirrors common usage–you might create 3 plans named Basic, Better and Best. I'm assuming that Basic in this example is the lowest price plan with the fewest features available for the user. And Best is the most expensive, with all features available for the user.
Step Three: Decide on your restrictions to assign to each plan
Let's assume you've created 3 plans: Basic, Better and Best (remember: Basic is the cheapest, Best is the most expensive, Better is between them). And that you have a bunch of modules installed: Ratings, Maps and Attachments, along with fields name, description, email, address, zip, Facebook and Twitter.
We're going to assign our fields to the plans so users get more as they pay more for a listing. Since the progression is Basic → Better → Best, we want to have increasing features available as we move “up” in the plans.
- Basic Plan Assigned Features (Lowest):
- Allow the listing to have category, business name, description, email only
- No access to Maps, Ratings or Attachments
- No contact form access
- No detail view of the listing
- Better Plan Assigned Features (Middle):
- Allow listing to have all of the fields from Basic, PLUS address, ZIP and Twitter
- Access to Maps only
- No contact form access
- Detail view of the listing allowed
- Best Plan Assigned Features (Highest):
- Allow listing to have ALL fields available (Better's fields + Facebook)
- Access to Maps, Ratings and Attachments
- Users can access and use the contact form to email the business
- Detail view of the listing allowed
Notice one thing from this assignment: Each higher plan builds on the features of the previous (lower) plan. We don't randomly scatter fields across the plans–Basic starts with the fewest, Better starts with all of the Basic fields and then adds more. Best has all the fields available. Better has more than Basic, but less than Best. You can do this with any number of plans you want, but keeping it simple is best for your users. Three plans is a typical way to configure it.
Step Four: Enable restrictions
Go under Directory → Settings → Restrictions. The very first time, you'll see this:
Clicking on the Checkbox will start the restriction process:
Step Five: Set the Restrictions you want for each Plan
This is where you'll spend the most time. What you see available to you for restrictions will depend on which modules you have installed.
BD supports the following modules for restrictions in plans:
- Google Maps
- Ratings
- Attachments
That means if you want only certain listings to support attachments, maps or ratings you can do that in restrictions.
We also support some core features that you can restrict access to, including:
- The detail link of the listing
- Character counts of title, short and long descriptions
- Whether links to the website fields are follow or nofollow
- Contact form for the listing
- Which fields the listing can show
We'll go over each of these in turn using the Tabs where they are configured:
Restrictions Settings Tab
This is where you restrict access to Ratings, Maps, or Attachments via plan. You can also set the contact form and detail link restrictions here as well. Here is an example screen for the Restrictions tab:
As you can see, there are three plans available to restrict–Basic, Better and Best. I'm assuming that Basic in this example is the lowest price plan with the fewest features available for the user. And Best is the most expensive, with all features available for the user. I'll assign features according to our list above:
- Basic Plan Assigned Features (Lowest):
- Allow the listing to have category, business name, description, email only
- No access to Maps, Ratings or Attachments
- No contact form access
- No detail view of the listing
- Better Plan Assigned Features (Middle):
- Allow listing to have all of the fields from Basic, PLUS address, ZIP and Twitter
- Access to Maps only
- No contact form access
- Detail view of the listing allowed
- Best Plan Assigned Features (Highest):
- Allow listing to have ALL fields available (Better's fields + Facebook)
- Access to Maps, Ratings and Attachments
- Users can access and use the contact form to email the business
- Detail view of the listing allowed
I will set the restrictions for the BOLD features above available on this tab, which becomes:
That takes care of everything EXCEPT the fields. Let's move to that tab next.
Field Display Tab
This tab is used to limit the fields that are available to view for a listing. It also restricts what the user sees on data entry for the Submit Listing process as well (you can't enter data you're not going to see). There are a few important things to know about field limits for restrictions:
- All custom post types in WordPress require that you have a Name and a Category for that type. Business Directory's listings are a custom post type (wpbdp_listing) so we are subject to this limit–you MUST have a business name and business category for every listing.
- Because name and category are required, they cannot be limited or restricted from the user, ever.
- This warning reminds you of that in BD's admin screen:
With that said, let's look at the field management tab:
The content of this restriction screen will depend on what YOU have entered under Directory → Directory Content → Form Fields. These fields were entered by me to match this example–yours will likely be different.
Notice on the left we have a list of our plans–Basic, Better and Best. Each one of them has a FULL list of the fields available from Form Fields. Two fields are greyed out (Name of Business and Business Genre) because of the limit I mentioned above (Name and Category cannot be restricted, ever). All other fields are available for us to restrict. So let's go back to our list of restrictions:
- Basic Plan Assigned Features (Lowest):
- Allow the listing to have category, business name, description, email only
- Better Plan Assigned Features (Middle):
- Allow listing to have all of the fields from Basic, PLUS address, ZIP and Twitter
- Best Plan Assigned Features (Highest):
- Allow listing to have ALL fields available (All fields for the Better PLUS Facebook)
- Allow access to Ratings
I've dropped the things we already configured in the last step…which leaves only the fields. Now I check the fields that I want to make available at that plan. The result looks like this:
Again, notice a few things:
- Each plan BUILDS on the previous plan–Better has everything that Basic had, plus some more. Best has everything (top plan).
- Every field is accounted for in SOME plan
Character Count Limits Tab
This final tab is used to restrict certain fields from exceeded a certain character count. You can currently restrict the following fields:
- Business Name/Title
- Short Description
- Long Description
The admin screen looks like this:
Using 0 in any restriction setting means that field is “unlimited”. Any non-zero number will restrict the characters to that set amount.
This tab is also home to one misc setting regarding “nofollow” links. By default, BD will make links from our listings “nofollow”, meaning that search engine crawlers will not go from your site to the target website to build search links. This is typical practice with WordPress.
However, you can enable Featured/Sticky listings to allow them to have “dofollow” links that will actually improve search rankings for their business thanks to a full backlink from your site. This feature is enabled for all featured listings on this tab. It can't be enabled per listing type or per plan today.
Gotchas and Tips for Restrictions
One thing that trips users up, is they add fields AFTER they've setup restrictions, but then don't return to and re-add fields to the appropriate plans.
Another is that they turn on restrictions, but then don't configure ANYTHING. If you do that, you'll see warnings like this on your admin screen:
Both are caused by the same problem–a lack of configuration for the field. Once you turn on restrictions, you must ensure that EVERY field or feature is accounted for in a plan. If you don't–you'll see the warnings here (with some different list of fields) that tell you to return to Directory → Settings → Restrictions and configure the field setup accordingly.