What's new

Two Questions

Data Glasses

Top Contributor
Hey Gang, i have two questions of which I am trying to work out myself but I figure I have a handy resource here so in the meanwhile I may as well ask if I don't find the answer fist
~
First question that I wish to change the wordpress user message when someone joins up , normally there is a message stating that a password has been sent out, i really want to add "all spam posts will be deleted" ..... now I either wish to add this the email they receive or in the wordpress registration notice. It seems this could be in a few places within the site's code, comments.php, page template, theme functions ?? Any hints in the right direction would be much appreciated ....... I am thinking i may be able to deter spammers by adding this message to the join up message
~
The second question is that I playing with the colours of the site and have managed to change the body from a brown to a white and it looks much better, however the font is white and now i can't see it (I expected that) but the thing is I tried for an hour last night to fix this and could not find the place in the code to change, no doubt I went past it plenty of times but I only found one #FFFFFF: and that was in the header (in the stylesheet) So I thought a pair of trained eyes may find the required destination before I spend the next two hours trying my luck changing little bits of code, I don't mind trying this stuff, as mentioned i changed the body last night and did not expect it to take so long to change the font, i see references to the hover over and underlines etc but not the P text colour ? I will past the page code here in the hope someone can point me to the spot? Art Post ? or maybe Art Menu ?? ,THANKS
 
Wow, no answers, ok then. I did find a plugin to do the spam warning, it's call SB Welcome Email and allowed me to put a 'All spam and links will be deleted" message, decided on another theme instead looking at code for hours on end
 
So you could edit the User registration Email, you ned to edit the function wp_new_user_notification(). You will need to add the code below to your functions.php:
Code:
function wp_new_user_notification($user_id, $plaintext_pass) {
    $user = new WP_User($user_id);

    $user_login = stripslashes($user->user_login);
    $user_email = stripslashes($user->user_email);

    $email_subject = "Welcome to MyAwesomeSite ".$user_login."!";

    ob_start();

    include("email_header.php");

    ?>

    <p>A very special welcome to you, <?php echo $user_login ?>. Thank you for joining MyAwesomeSite.com!</p>

    <p>
        Your password is <strong style="color:orange"><?php echo $plaintext_pass ?></strong> <br>
        Please keep it secret and keep it safe!
    </p>

    <p>
        We hope you enjoy your stay at MyAwesomeSite.com. If you have any problems, questions, opinions, praise,
        comments, suggestions, please feel free to contact us at any time
    </p>


    <?php
    include("email_footer.php");

    $message = ob_get_contents();
    ob_end_clean();

    wp_mail($user_email, $email_subject, $message);

There seems to be a good tutorial here
http://www.smashingmagazine.com/2011/10/25/create-perfect-emails-wordpress-website/
 
I am not always a fan of using plugins for everything. depending on the plugin, they can really drag your site down, if poorly coded or if too many plugins are installed.
 

Community sponsors

Domain Parking Manager

AddMe Reputation Management

Digital Marketing Experts

Catch Expired Domains

Web Hosting

Members online

No members online now.

Trending content

Forum statistics

Threads
11,107
Messages
92,086
Members
2,394
Latest member
Spacemo
Top