Well it really depends on how you want to approach this. There are plenty of plugins out there who can make content restriction easy for you but you can also build your own in case you are looking for something simple though different means.
A very basic example would be to use the template_redirect or wp action hooks where you have access to WP conditional tags.
Lets say you want to restrict access to a page called “Premium Content” for those who does not have at least 100 points by redirecting them to “Restricted” page. You could do it in the following way:
add_action( 'wp', 'restrict_access_based_on_points' );
function restrict_access_based_on_points()
{
// Ignore admin area
if ( is_admin() ) return;
// Check if this is the premium content page
if ( is_page( 'premium-content' ) ) {
// Get users balance
$users_balance = mycred_get_users_cred();
// Check if it is less then 100 and that we are not admins
if ( $users_balance < 100 && !mycred_is_admin() ) {
wp_safe_redirect( home_url( '/restricted/' ) );
exit;
}
}
}
You could also do this though the template_redirect action hook but wp is the earliest instance you can use conditional tags ( is_page() ). As you can see in the code, we redirect everyone with a balance lower then 100 unless they are admins.