Show templates based on option chosen on first part of reg form

Hi,

can you please help me out. I know it is not option by default, but I would like for new users to select there templates only from category based on option they chosen on first part of registration. If they select option 1 on first wp-singup page i would like them to only be able to pick templates from first category.

  • Nithin

    Hi Matej,

    Hope you are doing good today. :slight_smile:

    By default there isn't any option to select a category, in the 1st part of the registration, the plugin only offers option to sort/select themes according to the category in the 2nd part of the registration.

    I'm afraid, this would require custom coding to achieve what you are looking for, if you are considering custom development, would recommend you to check the Jobs & Pros section in order to get this done with the help of a professional.

    Please do note members found in the Jobs & Pros are individuals, and doesn't have any affiliate with WPMU DEV.

    Kind Regards,
    Nithin

  • Matej

    Hi,

    thank you for your anwser.

    I got it working by editing "blog_templates-registration-previewer.php". I know it's not perfect solution (must not update plugin), but it works for me.

    $model = nbt_get_model();
    	if ($reg_option == "1") {
    	$templates = $model->get_templates_by_category( 1 );
    	}
    	else {
    		$templates = $model->get_templates_by_category( 3 );
    	}

    before:

    foreach ($templates as $tkey => $template) {
    		nbt_render_theme_selection_item( 'previewer', $tkey, $template, $settings );
    	}

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.