New Blog Templates: how to use new feature (showcase)?

Hi,

The brand new version of the (great) New Blog Templates provides a (great) new feature: user can select his template via a showcase inside a page.

The problem is I don't understand how to use it. I activated this new option and selected a new page for displaying the showcase. But now, if a user sign to my site, he's never asked to choose a template.

Please advise :slight_smile:

Best Regards

  • Arom77

    @Alexander Rohmann

    Yes I modified my wp-signup.php. I used custom functions as follow. I only wanted to change text but as I'm not (I mean "not al all :wink:") a developper there may be some issues here.

    In fact I've already seen that the translation of "set blog description" doesn't work:
    https://premium.wpmudev.org/forums/topic/set-blog-description-french-translation-doesnt-work

    But no idea why :slight_frown:

    <?php
    
    /**
     * Modify default wp-signup.php text
     */
    function themename_wp_signup_text( $translated_text, $untranslated_text, $domain ) {
        global $pagenow;
    
        if ( is_multisite() && $pagenow === 'wp-signup.php' ) {
    
        switch ( $untranslated_text ) {
                case 'Get your own %s account in seconds' :
                $translated_text = __( '<br>Bienvenue ! Créez votre site professionnel en quelques minutes' );
    	    break;
    
            }
    
    switch ( $untranslated_text ) {
                case '(Must be at least 4 characters, letters and numbers only.)' :
                $translated_text = __( 'Veuillez choisir votre identifiant personnel. Il doit contenir au moins 4 caractères, uniquement des lettres minuscules ou des chiffres.' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Site Title:' :
                $translated_text = __( '<u>TITRE DU SITE</u> :<br><em>Cette information figurera en haut de la page principale (accueil) de votre site, de manière très visible.<br>Sur nos modèles, nous avons systématiquement mis le nom du praticien. Exemple : Docteur xxx</em>' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Username:' :
                $translated_text = __( '<u>IDENTIFIANT</u>' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Email&nbsp;Address:' :
                $translated_text = __( '<u>ADRESSE EMAIL</u>' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Site Domain:' :
                $translated_text = __( '<u>DOMAINE DU SITE</u> :<br><em>Choisissez le nom de votre site pour constituer votre adresse Internet temporaire. Exemple : docteurxxx<br>Pour rappel, à la fin de la période de test de 7 jours, si vous souscrivez une abonnement, une adresse Internet définitive conforme à la Charte de votre Ordre sera attribuée à votre site.</em>' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'We send your registration email to this address. (Double-check your email address before continuing.)' :
                $translated_text = __( 'Merci de bien vérifier que votre email est correctement renseigné : nous enverrons la confirmation de votre inscription à cette adresse.' );
    	    break;
            }
    
    switch ( $untranslated_text ) {
                case 'Gimme a site!' :
                $translated_text = __( 'Je veux créer mon site maintenant' );
    	    break;
            }
    
    switch ( $untranslated_text ) {
                case 'Just a username, please.' :
                $translated_text = __( 'Je veux uniquement activer mon compte personnel maintenant, je reviendrai créer mon site plus tard' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' :
                $translated_text = __( '' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'The site %s is yours.' :
                $translated_text = __( '<br>Félicitations, votre site est maintenant créé ! <br><br><br>' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Sites you are already a member of:' :
                $translated_text = __( '<br>Pour rappel, vous possédez déjà le(s) site(s) suivant(s) :' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart’s content, but write responsibly!' :
                $translated_text = __( '<br>Nous sommes heureux de vous revoir, %s. En remplissant le formulaire ci-dessous, vous pouvez <strong>créer un autre site avec votre compte</strong>.' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'Get <em>another</em> %s site in seconds' :
                $translated_text = __( '<br>Créez un autre site en quelques minutes !' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case 'If you’re not going to use a great site domain, leave it for a new user. Now have at it!' :
                $translated_text = __( '<br>Vous pouvez commencer la création dès maintenant !' );
                break;
            }
    
    switch ( $untranslated_text ) {
                case '<a href="http://%1$s">http://%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' :
                $translated_text = __( 'Vous pouvez aller sur votre site : <a href="http://%1$s">http://%2$s</a><br><br>Nous vous rappelons que cette adresse est temporaire. A la fin de la période de gratuité, à la souscription de votre abonnement, nous vous enverrons les documents que vous devrez retourner signés à votre Conseil départemental, pour créer une adresse définitive, conforme à la Charte.<br><br>Vous pouvez dès maintenant vous connecter à votre <a href="http://%1$swp-admin">espace de gestion de votre site</a> avec votre identifiant “%4$s”, en utilisant votre mot de passe, pour personnaliser votre site.<br><br><u><strong>Notez bien</strong></u>, pour les prochaines utilisations, que vous devrez rajouter le suffixe /wp-admin à la nouvelle adresse de votre site Internet pour accéder à votre espace de gestion<br><br>' );
                break;
            }
    
        }
    
        return $translated_text;
    }
    add_filter( 'gettext', 'themename_wp_signup_text', 20, 3 );
  • Alexander

    Hi @Arom77,

    I think Genesis is the problem here. It might be using a customized signup page that excludes the hook used to add that feature.

    I just tested this in TwentyFourteen and it worked just fine. Can you try with TwentyThirteen/Fourteen/Twelve (a WordPress Default) and see if this works?

    Hopefully we can narrow down that the theme is the problem here and go from there.

    Best regards,

  • Arom77

    A few more precisions.

    1/ "Show templates selection on registration" issue

    I've just tried on another test environment. When "Show templates selection on registration" is enabled, wp-signup.php redirects firstly on the page where all templates are displayed. And then only after completing this first step you go to /wp-signup.php?blog_template=2 (where you can signup to the network).

    On my website howevever, when you click on wp-signup.php you immediately get the fields where you can signup to the network. And the url is /wp-signup.php (not /wp-signup.php?blog_template=2).

    2/ "Set blog description" translation issue
    On my test environment the set blog description translation doesn't work either. Could you confirm to me that the correct file name is sbd-fr_FR.mo ?

    Thanks!

  • Arom77

    Another update about the "Show templates selection on registration" issue:

    - On my website, I tried to deactivate everything: mu plugins, network activated plugins, plugins activated on the main site. I used twenty fourteen too. The problem is still here.

    - On my test environment, I activated the same plugins I use on my website: mu plugins, network activated plugins and plugins activated on the main site. I activated the Genesis framework and the same Genesis childtheme too. The problem is NOT here!

    Does it mean "something wrong" was written in my website database about the signup page? What could I do to fix it?

    Thanks a lot!

    PS:
    1/ I tried to fix databases in the new blog templates settings but it didn't change anything.
    2/ I compared the wp-signup.php file on my website and the one on my test environment and they are 100% identical.
    3/ I did the same for the wp-config.php and there are some differences:
    - Table prefix is different, as I didn't use the standard wp_ in my website.
    - On my website I've got this line which is not in my test environment:
    define( 'SUNRISE', 'on' );

    (I know I put this here because of the Domain mapping plugin)

    - On my website I've got the following line too which is not in my test environment:
    define ('WP_ALLOW_MULTISITE', true ) ;

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.