Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created February 24, 2021 12:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrewlimaza/4611c3128b521b873d286cc6c7296994 to your computer and use it in GitHub Desktop.
Save andrewlimaza/4611c3128b521b873d286cc6c7296994 to your computer and use it in GitHub Desktop.
Adjust the Paid Memberships Pro login "Join Now" Link.
<?php
/**
* Adjust the 'Join Now' link on the login page to a custom URL for Paid Memberships Pro.
* Follow this guide to add custom code to your membership site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_custom_join_now_link( $links, $allowed_html ) {
$links['register'] = '<a href="' . add_query_arg( 'level', '13', pmpro_url( 'checkout' ) ) . '">' . __( 'Join Now', 'paid-memberships-pro' ) . '</a>';
return $links;
}
add_filter( 'pmpro_login_forms_handler_nav', 'my_pmpro_custom_join_now_link', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment