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

    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

  • Andrea

    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.

  • Konstantinos Xenos

    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

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.