I want to use the shortcode [ms-membership-signup] but reorder the memberships


I am using protected content and the shortcode [ms-membership-signup]. I would like to order the memberships as I choose instead of newest membership on top and oldest on the bottom. Is there a way to do this?

  • Vinod Dalvi

    Hi Jill,

    Welcome to the WPMU Dev community and thank you for your question.

    Currently there isn't any plugin option to change the order of memberships. I will move this over to the features & feedback section. This way it can be considered for future development, and we can also see what other community members think about the feature request.

    In the meanwhile you can change the memberships order by developing the custom code using the Protected Content filter ms_view_shortcode_membership_signup_data like following. You have to add the following code in the functions.php file of your child theme.

    function custom_ms_view_shortcode_membership_signup_data( $data, $attrs ){
    	// Add the code here to change the order of memberships in $data
    	// You can see the data contained in $data by adding this code below print_r($data);
    	return $data;
    add_filter( 'ms_view_shortcode_membership_signup_data', 'custom_ms_view_shortcode_membership_signup_data', 10, 2 );

    Please advise if you have more questions.

    Thank you for being a WPMU DEV member and have a fantastic day!

    Vinod Dalvi

  • Vinod Dalvi

    Hi Jill,

    Thank you for your reply.

    The shortcode is displaying on the page as text because the protected content plugin doesn't provide any shortcode like.

    Are you using this shortcode from any other plugin?

    You will find all the shortcodes provided by protected content plugin on the following path.

    Admin Area -> Protected Content -> Help -> Shortcodes

    Please advise.

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.