Last active
July 18, 2024 20:46
-
-
Save wp-user-manager/ff7d6c58906fba97b983a013b90cb5aa to your computer and use it in GitHub Desktop.
WP User Manager - Content Restriction function to restrict parts of a templat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
get_header(); | |
if ( wpum_can_access_restricted_content() ) : ?> | |
Some extra content in the template that is restricted as per the restriction settings of the page | |
<?php endif; ?> | |
<div> | |
<?php the_content(); ?> | |
</div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@wp-user-manager how can I use this function to show the content based on a user role?