Posts and pages are the core content types used in any WordPress website. As we discussed in Chapter 4, Building Blocks of Web Applications, custom post types play a major role compared to posts and pages in websites. So, understanding how to implement restrictions on these three content types is key to developing a quality application with proper authorization. These content types can be restricted in many common and innovative ways. We will be looking at the most common restrictions on these content types to suit any web application:
- Shortcode-based restrictions: This technique is used to restrict a part of the post/page/custom post type from different user levels. We use a shortcode, capable of handling different restrictions, and place it on a post editor. Any content placed between the opening and closing shortcode tags will be restricted based on the restriction...