Adding a description to step 2 of the registration on Membership 2 Pro

Hello,

On step 2 of the registration process using Membership 2 Pro plugin, the user is asked to create an account by entering some basic info. Is there a way for me to add some text before the forms on this page to give the user some instructions?

I have several buttons on my site that link directly to a specific membership ex: http://hijrt.com/register/?membership_id=357 Rather than the default membership page http://hijrt.com/register/ and I'd like to add some instructions for the user to know what they are registering for.

Thanks,
Chris

  • Kasia Swiderska

    Hello Christopher,

    You can do that by using following code:

    add_action( 'wp_head', 'set_custom_content' );
    function set_custom_content() {
    	$before_text = '<div id="ms_before_text" class="ms_custom_text">My Custom Before Text</div>';
    
    	?>
    	<style>
    	.ms_custom_text{margin: 15px 0;}
    	</style>
    	<script type="text/javascript">
    	jQuery(function($) {
    
    		if( $( '.ms-membership-form-wrapper' ).length ){
    			$( '.ms-membership-form-wrapper' ).prepend( '<?php echo $before_text ?>' );
    
    		}
    	});
    	</script>
    	<?php
    }

    Set correct custom text in $before_text.

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.