Last active
July 10, 2017 14:34
-
-
Save strangerstudios/57c3e65848109eb8628bc39cd0e68618 to your computer and use it in GitHub Desktop.
have PMPro treat info notices like posts with regards to protecting by category #member #access
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
/** | |
* Have PMPro treat info notices like posts with regards to protecting by category | |
* Add this code to a custom plugin. | |
* #pmpro #notices | |
*/ | |
function pmpro_membership_access_post_info_notice($post) { | |
if($post->post_type == 'info-notice') | |
$post->post_type = 'post'; | |
return $post; | |
} | |
add_filter('pmpro_membership_access_post', 'pmpro_membership_access_post_info_notice'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment