Now that we have additional data stored in user profiles and have facilitated the viewing of this information in the administration pages, the only missing component to achieve our goal of restricting some site content to paid users is to introduce a new enclosing shortcode that will check a user's level before displaying content. The recipe will show how to create this new shortcode.
Using custom user data in containing shortcode
Getting ready
You should have already followed the Display new user data in user list page recipe to have a starting point for this recipe and the resulting plugin should still be active in your development site. Alternatively, you can get the resulting code (Chapter 7/ch2-private-item-text...