function wpmu_signup_stylesheet()

In wp-signup, is function wpmu_signup_stylesheet() { related to the style css immediately below it in the signup file?
--------------------
function wpmu_signup_stylesheet() {
?>
<style type="text/css">
.mu_register { width: 90%; margin:0 auto; font-weight:700; padding:10px; color:#00cc00; }
.mu_register form { margin-top: 2em; }
.mu_register .error { font-weight:700; padding:10px; color:#333333; background:#FFEBE8; border:1px solid #CC0000; }
.mu_register input[type="submit"],
.mu_register #blog_title,
.mu_register #user_email,
.mu_register #blogname,
.mu_register #user_name { width:100%; font-size: 24px; margin:5px 0; }
.mu_register #site-language { display: block; }
.mu_register .prefix_address,
.mu_register .suffix_address {font-size: 18px;display:inline; }
.mu_register label { font-weight:700; font-size:15px; display:block; margin:10px 0; }
.mu_register label.checkbox { display:inline; }
.mu_register .mu_alert { font-weight:700; padding:10px; color:#333333; background:#ffffe0; border:1px solid #e6db55; }
</style>
<?php
}
----------
I have added the portion
font-weight:700; padding:10px; color:#00cc00;

Without it the text was almost unreadable, but the whole page looks poor. The "body of the page somehow seems to be missing.

  • Sajid

    Hi @joe,

    Hope you are doing good today :slight_smile:

    Yes, this function is responsible to print styles on wp-signup.php form on frontend. But I strongly recommend you to not edit any core files and use action hooks instead to add edit some files/code.

    For example using following code you can add your custom CSS code only on signup page. Add this code in functions.php file of your child theme or use as mu-plugin.

    function wpmudev_print_custom_style() {
    	?>
    	<style type="text/css">
    		#Your style goes here.
    	</style>
    	<?php
    }
    
    add_action( 'after_signup_form', 'wpmudev_print_custom_style' );

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • Adam Czajczyk

    Hello Joe,

    I hope you're well today!

    As my colleague @Sajid mentioned, the function affects "front-end signup form". The default "login/register" WP pages are showing fine on your site, using default WP styles (except for custom logotype). The "/wp-signup.php" page, as I can see it now, is also there and I can see the form with green(ish) labels/text on it.

    That said, could you please point me to a right direction what should I be looking for (what's exactly missing here)? If you could share more detailed explanation of what exactly are you wishing to achieve, I'm sure we could find the solution :slight_smile:

    Best regards,
    Adam

  • joe

    Hi Adam
    The greenish labels/text were added by me because the text prior to that had become unreadable.
    I have removed my addition so you can see what it looks like with the standard text.

    I'm sure the signup page should look just the same as any other page with the form fields bordered inside a green bordered larger container just like an ordinary page or post. The home page for example.

    I pulled out an old snapshot, and of course it has not saved a prior version of the wp-signup page.

  • Michael Bissett

    Hey @joe, Michael here! :slight_smile:

    Expanding on the code that my colleague @Sajid posted earlier, here's what you'll need to get that white background & green border on your signup and activation pages:

    function wpmudev_print_custom_style() {
    	?>
    	<style type="text/css">
    	div#signup-content {
    		background: white;
    		border-radius: 5px;
    		border: 4px solid #01DF3A;
    	}
    	</style>
    	<?php
    }
    
    add_action( 'after_signup_form', 'wpmudev_print_custom_style' );
    
    add_action( 'activate_wp_head', 'wpmudev_print_custom_style' );

    If you were to insert that into your site as a mu-plugin, you should be all set here. :slight_smile:

    To do this, go to your /wp-content/ folder via FTP, and find the folder called "mu-plugins". If there is no folder with that name, then you'll want to create one. Then, create a file inside that folder, and give the file any name you like (making sure the file has an extension of .php, e.g. example.php) and paste the code in there.

    You don't need to activate that plugin, as it will be always be automatically activated. Please be sure to add a PHP start tag at the beginning of the code if you insert this code as a mu-plugin, like this:

    <?php

    Let me know if this helps please!

    Kind Regards,
    Michael

  • joe

    Hi Michael
    That worked fine thank you.

    The puzzling aspect is that the way the page looks now with your mu plugin applied is the way the page looked for months. I have no idea why it changed, or even when, and was only alerted when a user emailed me to say the signup page was almost unreadable.

    It gets very frustrating when there are unknowns in the equation, making my learning curve all the more difficult.

    Once again thank you - points on the way.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.