• Hello!

    Just a quick question.

    Is there a way to modify the styling of the email the admin gets when a non-admin user signs into the site?

    I mean this email, with this subject:
    [Wordfence Alert] http://www.site.com User login

    For example, I’d like to make the username bigger and bold so I can spot it right away.

    Any chance that can be done?

    Please let me know.
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • There are various email_xxxx.php template files in the Wordfence LIB folder that you can certainly modify to suit your needs… just note that you will have to re-edit any changes you make each time WF gets updated.

    Thread Starter catmaniax

    (@catmaniax)

    Thanks for the reply.

    Ok, so can you tell me exactly what I should change so it can show just the username in bold and big font because I’m not too familiar with coding and I’m afraid I mess something up.

    This is the e-mail’s excerpt I want changed, the word “david” in this example:

    A non-admin user with username “david” signed in to your WordPress site. User IP:………

    Please let me know.
    Thanks!

    I just looked again – the templates really aren’t that granular that you can isolate specific parts of the message in order to style them differently from other parts…

    At best, you can apply a style (using inline CSS) to the various retrieved blocks of text items inserted into the template – one of them being the alert message as a whole.

    But without coding, or at least, CSS experience – there really isn’t much you can do from your end in any practical sense. I wouldn’t recommend it, since it would be very easy for you to create problems for yourself.

    Thread Starter catmaniax

    (@catmaniax)

    Thanks for the reply.

    You can tell me what needs to be changed and I will try and test it on my localhost first. After searching for a while, I found out that the line that appears on the e-mail is located at: wordfence\lib\wordfenceClass.php. That is line 1405:

    wordfence::alert(“User login”, “A non-admin user with username \”$username\” signed in to your WordPress site.”, wfUtils::getIP());

    So I guess what I need to do is write and some inline CSS before and after \”$username\”

    Is that correct?
    Could you please give me an example of some inline CSS to use for this?

    Also, do you plan on maybe adding the options to customize Wordfence emails at some point in the future?

    Please let me know.
    Thanks!

    Please note – I’m not part of Wordfence admin/support, just a long-time WF user.

    Again – if you’re not a web programmer, I don’t suggest you muck about with it. Too many chances to mess it up, and any changes you make will disappear the next WF update!

    Thread Starter catmaniax

    (@catmaniax)

    Ok, thanks for the reply.

    I can change it each time WF gets updated, that’s no problem for me.
    If you know how I can do that please let me know, otherwise I’m gonna contact WordFence and ask them.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Change email styling’ is closed to new replies.