PHP code example of justintadlock / members

1. Go to this page and download the library: Download justintadlock/members library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

justintadlock / members example snippets

 if ( current_user_can( 'capability_name' ) ) echo 'This user can do something'; 
 if ( current_user_can( 'read_pages ' ) ) : 
 the_content(); 
 endif;