Random Post in Related Post

function custom_pre_get_posts($wp_query) {
$wp_query->set(‘orderby’, ‘rand’);
$wp_query->set(‘order’, ‘ASC’);
}

add_action(‘pre_get_posts’, ‘custom_pre_get_posts’);

Related Articles

MemberPress Check active

add_action ( ‘template_redirect’, ‘redirect_custom_nonactive’ );function redirect_custom_nonactive(){if ( current_user_can(‘mepr-active’) && is_front_page() ) {echo ‘Welcome, active member user!’;}else { echo ‘Welcome, non-active registered user!’;} }

Updating Memberpress Default Values

jQuery(document).ready(function( $ ){ $(“label[for=’user_login1′]”).text(‘Input your preferred username for the challenge*’); $(“label[for=’mepr-address-state1′]”).text(‘State/Province if not available then put country*’); });