Created
September 4, 2017 14:18
-
-
Save wholebiz/d37bbe097b38c076aa4467c2ed99aa7e to your computer and use it in GitHub Desktop.
Function to change Register Button link
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function paid_membership_pro_registration_url() { | |
$url = 'The_url_of_your_levels_page'; | |
return $url; | |
} | |
function paid_membership_pro_register_btn() { ?> | |
<script type="text/javascript" id="paid_membership_pro_register_btn"> | |
jQuery( document ).ready( function( $ ) { | |
"use strict"; | |
var url = '<?php echo paid_membership_pro_registration_url(); ?>'; | |
$( '.logged-out #thrive_nav #user-nav-user-action > a:nth-child(2)' ).attr( 'href', url ); | |
}); | |
</script> | |
<?php } | |
add_action( 'wp_footer', 'paid_membership_pro_register_btn' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment