This code snippet is specifically for the User List extension, which many users use to implement a User Directory. The code snippet discussed here will demonstrate how to include on option in the registration form for users to “opt out” of being displayed in the directory. [Read more...]
WP-Members has always focused on content contained in the WordPress $content variable. More recently, the popularity of builder plugins such as Page Builder by SiteOrigin or Elegant Builder from Elegant Themes has raised the issue of blocking content that is not necessarily stored in the same manner.
The post focuses on the general approach to blocking content from these types of plugins and includes code snippets you can use for the two plugins mentioned above. [Read more...]
On occasion, the question of how to only prompt to login after a specific number of page views or an amount of time has passed. While there is no real fool proof way to implement this type of process, there are some ways you can implement it if this is right for you.
This demonstration will focus on requiring a user to login on blocked content after a set number of pages have been viewed on the site. [Read more...]
I have written code snippets before on how to restrict content by user level, but that particular code snippet is based on restricting specific categories to specific user levels, with higher level users still being able to access lower level content. For example, Silver, Gold, and Platinum level users having access or not to categories of the same name.
But what if you have content that you need to block by level that is not necessarily in a category? Or what if you are using pages that need the same level of restriction.
Here is a code snippet that will allow you to assign a “level” to any content – post or page, and then assign a user level for the users. This example provides a working code snippet for applying a series of progressive levels (higher level users have access to lower level content). The example begins with three generically named levels, these can be renamed and expanded or contracted as needed. [Read more...]
This concept is similar to the process outlined in How to add multiple user levels by category. However, the difference here is that we will restrict each category to a specific group (or level), but those users will not have access to the other categories.
In the other example, higher level users have access to lower level categories. In this example, each category is restricted to that specific group of users. [Read more...]