Navigation Menu

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 travislima/e2a8ec1eae51c8014de20e1e99b67456 to your computer and use it in GitHub Desktop.
Save travislima/e2a8ec1eae51c8014de20e1e99b67456 to your computer and use it in GitHub Desktop.
Open comments so anyone may read them
<?php
/**
* Allows non-members to read comments on restricted posts.
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function make_pmpro_comments_open() {
remove_filter( 'comments_array', 'pmpro_comments_filter', 10, 2 );
}
add_action( 'init', 'make_pmpro_comments_open' );
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Display Comments on a Members-Only Post to Non-Members" at Paid Memberships Pro here: https://www.paidmembershipspro.com/display-comments-of-a-member-only-blog-post-to-non-members/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment