Create a page selling only one level pro site memebrship a time

Hi, even coding, hiding the options dynamically, anyway you think could be possilbe, I would like to have the possibility to set a pro-site page where only selected membership levels are visible. Like if I want to do an offer on only the Premium an above levels I can create a landing where I show the button only of them hiding the plans I don’t want to be used. I was thinking hiding dinamically the buttons and the tabs but before to start coding maybe you have in mind some better options to suggest, or pointing me to the write functions maybe to develop a custom shortcode or something.

Hope you can help.

Thanks

Andrea

  • Kasia Swiderska
    • Support nomad

    Hello Andrea,

    At this point, it might be a very complex task because Pro Sites doesn’t allow to have more than one page where the pricing table is visible and checkout can be done.

    It only uses one default page and there is no option to split it between multiple pages.

    However, I think that maybe it would be possible to hide part of the tables depending on where the user comes from (from specific referrer). I would need to consult this with developers – but do you think that would work for you?

    kind regards,

    Kasia

  • Patrick Freitas
    • Staff

    Hi Andrea

    How are you today?

    I’m afraid most of the code would be done by JavaScript or CSS using some WordPress hook, could you describe the situation when you want to disable part of tables, I mean, it is set by location like country, user role…

    Let us know that information and we can try to help you.

    Best Regards,

    Patrick Freitas

  • Andrea
    • WPMU DEV Initiate

    Hi Patrick, sorry for the late answer, at that point I think that the one solution could be to condition some Blog templates (from the plugin) to specific level.

    I was thinking to create 2 different level templates, and if one select the basic category they get redirect to the pro-sites where the basic and the other options are on

    If the select an advanced template they get redirect to the prosite page where the basic option get turned off via some CSS or JS and so they must chose from advanced and above plan, you think it would be possible?

    Basically would be perfect to attach some sort of hook to the blogs templates, or condition the selection somehow in the pro-site page with the blog ID or based on some triggered global variable maybe?

    Thanks in advance.

  • Kasia Swiderska
    • Support nomad

    Hello Andrea,

    So the user would be coming from the same page, but they would be selecting different blog templates on that page – I am assuming that you also want to use New Blog Templates plugin with Pro Sites, correct? Or you have something different in mind?

    This would be a bit different approach than having users coming from different pages.

    Let me know

    kind regards,

    Kasia

  • Andrea
    • WPMU DEV Initiate

    New Blog template I am testing it now and seems to me a perfect solution, and Pro site of course.

    It is a different approach yes, I am trying to figure out a way to make it work, and I saw that on an option in the url there is the url with the template number so I think I will use this as point to customise.

    If you have any good idea to suggest please let me know.

    Thanks

    Andrea

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi Andrea ,

    In New Blog Templates Settngs there's the option As a showcase inside a page at "Type of Selection". You can use this option and select a blank page basically to use as a 'landing' page for registration. This will make your users to first select a template and then move forward to the Pro Sites plan selection.

    Now that this step is done, you can then use this add_action to customize the Pro Sites plan selection page with any css etc that you like.

    In this code example, I have the $basic_templates with IDs 1, 4 and 8 and the $advanced_templates with IDs 2, 5 and 6. If you see in the following screenshot I have selected the blog_template with ID 2, that falls into the advanced category so the code hides the 'basic' pro sites selection.

    The extra css for "#prosites-signup-form-checkout #blog_template-selection" is used to hide the Template selection from the registration page as well to avoid confusion and not let users re-apply a different template during the registration.

    You can add this snippet in your functions.php ( preferably the child-themes ) and adjust the code to your liking for hiding the unnecessary plans.

    Tell me if you need further help customizing this!

    add_action( 'after_signup_form', 'my_custom_signup_ps_page' );
    function my_custom_signup_ps_page() {
    if ( ! empty( $_GET['blog_template'] ) && intval( $_GET['blog_template'] ) ) {
    $template_id = $_GET['blog_template'];
    $basic_templates = array( '1', '4', '8' );
    $advanced_templates = array( '2', '5', '6' );
    $content = '';

    if ( in_array( $_GET['blog_template'], $basic_templates ) ) {
    ob_start();
    ?>
    <style>
    #prosites-checkout-table ul.pricing-column.psts-level-2 {
    display: none !important;
    }

    #prosites-signup-form-checkout #blog_template-selection {
    display: none !important;
    }
    </style>
    <?php
    $content = ob_get_clean();
    } elseif ( in_array( $_GET['blog_template'], $advanced_templates ) ) {
    ob_start();
    ?>
    <style>
    #prosites-checkout-table ul.pricing-column.psts-level-1 {
    display: none !important;
    }

    #prosites-signup-form-checkout #blog_template-selection {
    display: none !important;
    }
    </style>
    <?php
    $content = ob_get_clean();
    }

    echo $content;
    }
    }

    Regards,

    Konstantinos

  • Simplebutcreative Media
    • Site Builder, Child of Zeus

    I’ve been asking for a feature like this forever. I can’t even do a proper offer. I’m force to show all my packages.

    This should be treated similar to membership 2. I can create the memberships and add a particular membership shortcode to any page I wish…

    Also the customer flow needs major improvements. WPultimo is far ahead of pro site.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.