Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasplevy/9b165a5494166cf70713e551da60349c to your computer and use it in GitHub Desktop.
Save thomasplevy/9b165a5494166cf70713e551da60349c to your computer and use it in GitHub Desktop.
<?php // don't copy this to your functions.php file
/**
* Add additional pages to the list of pages shown to non-enrolled visitors when sitewide membership restrictions are in effect
* @param array $ids WP Post IDs
* @return array
*/
function my_lifterlms_sitewide_restriction_bypass_ids( $ids ) {
// add the WP Post IDs of posts which can be accessed without being an enrolled member here
$custom_ids = array( 123, 456, 789 );
return array_merge( $ids, $custom_ids );
}
add_filter( 'lifterlms_sitewide_restriction_bypass_ids', 'my_lifterlms_sitewide_restriction_bypass_ids', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment