Disable REST API Links

remove_action( ‘xmlrpc_rsd_apis’, ‘rest_output_rsd’ ); remove_action( ‘wp_head’, ‘rest_output_link_wp_head’ ); remove_action( ‘template_redirect’, ‘rest_output_link_header’, 11 );Continue reading

Add Menu Order to Posts

// Register the meta box function add_menu_order_meta_box() { add_meta_box( ‘menu_order_meta_box’, // Unique ID ‘Menu Order’, // Box title ‘display_menu_order_meta_box’, // Content callback ‘post’, // Post type ‘side’, // Context ‘default’ // Priority ); } add_action(‘add_meta_boxes’, ‘add_menu_order_meta_box’); // Display the meta…Continue reading

Add Textbox To Donation Form

/** * Shows how to add a custom text box in a donation form. * In this example, we are adding a text box to collect a special referral code that the admin can read later. * * This snippet…Continue reading

MemberPress: Mailchimp Feed Unblocker

function allow_mc_through( $block, $post, $uri ) { if( isset( $_GET[‘allow_mailchimp’] ) ) { $block = false; } return $block; } add_filter( ‘mepr-pre-run-rule-content’, ‘allow_mc_through’, 11, 3 );Continue reading

MemberPress: Manually Refresh Member Data

/** * Manually refresh all members’ data. * * Once this snippet is added, visit /wp-admin/?update-member-data=true on your site to update all member data. * After running the update, clear any site cache and check the Members page again. */…Continue reading