MemberPress: Disable Admin Password Lost/Changed Email

function mepr_disable_admin_pw_changed_email( $recipients, $subject, $message, $headers ) { if( strpos( $subject, ‘Password Lost/Changed’ ) !== false ) { $recipients = array(); // no recipients } return $recipients; } add_filter( ‘mepr-wp-mail-recipients’, ‘mepr_disable_admin_pw_changed_email’, 11, 4 );Continue reading

MemberPress: Hide Protected Posts on Archive Page

function mepr_exclude_protected_posts_from_archive( $query ) { if( !$query->is_admin && $query->is_archive() && $query->is_main_query() ) { $posts_to_exclude = array(); $posts = get_posts( array( ‘numberposts’ => -1 ) ); foreach( $posts as $post ) { if( MeprRule::is_locked( $post ) ) { $posts_to_exclude[] = $post->ID;…Continue reading

MemberPress: Hide Protected Posts from Search Results

function mepr_exclude_protected_posts_from_search( $query ) { if( !$query->is_admin && $query->is_search && $query->is_main_query() ) { $posts_to_exclude = array(); $posts = get_posts( array( ‘post_type’ => get_post_types(), ‘numberposts’ => -1 )); foreach( $posts as $post ) { if( MeprRule::is_locked( $post ) ) { $posts_to_exclude[]…Continue reading

Add the_content to storefront template.

function jp_inject_the_content() { remove_action( ‘digitalstore_store_front’, ‘digitalstore_front_latest_downloads’, 2 ); add_action( ‘digitalstore_store_front’, ‘digitalstore_front_latest_downloads’, 3 ); add_action( ‘digitalstore_store_front’, ‘jp_add_content’, 2 ); } add_action( ‘init’, ‘jp_inject_the_content’ ); function jp_add_content() { echo apply_filters( ‘the_content’, get_post_field( ‘post_content’, get_the_ID() ) ); } add_action( ‘init’, ‘jp_add_content’ );Continue reading