Title: Code on login page
Last modified: August 31, 2016

---

# Code on login page

 *  Resolved [Armshouse Group](https://wordpress.org/support/users/armshous/)
 * (@armshous)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-on-login-page/)
 * Hi there,
 * Just upgraded WordPress to 4.5 and to the latest WordFence version too. Installation
   went OK, but I have the following code at the top of the WP login page:
 *     ```
       (function(url){ if(/(?:Chrome\/26\.0\.1410\.63 Safari\/537\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){ return; } var addEvent = function(evt, handler) { if (window.addEventListener) { document.addEventListener(evt, handler, false); } else if (window.attachEvent) { document.attachEvent('on' + evt, handler); } }; var removeEvent = function(evt, handler) { if (window.removeEventListener) { document.removeEventListener(evt, handler, false); } else if (window.detachEvent) { document.detachEvent('on' + evt, handler); } }; var evts = 'contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop keydown keypress keyup mousedown mousemove mouseout mouseover mouseup mousewheel scroll'.split(' '); var logHuman = function() { var wfscr = document.createElement('script'); wfscr.type = 'text/javascript'; wfscr.async = true; wfscr.src = url + '&r=' + Math.random(); (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr); for (var i = 0; i < evts.length; i++) { removeEvent(evts[i], logHuman); } }; for (var i = 0; i < evts.length; i++) { addEvent(evts[i], logHuman); } })('//www.armshousegroup.co.uk/?wordfence_logHuman=1&hid=053AC61F2D67B6517856FA554D11B72F');
       ```
   
 * Any ideas?
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

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

 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-on-login-page/#post-7266963)
 * Hi,
 * Do you have any customizations to your login page? I haven’t seen this happen
   before — this code is normally included (without being visible) on regular pages
   for the Live Traffic feature — I can’t see why it may be appearing visibly on
   the login page, but it may be due to another plugin or other manual customizations.
 * There seems to be some bad HTML (misplaced quotes and brackets) after the style
   tag for: /themes/salient%20child/login/login-styles.css
 * You can temporarily turn off the “Live Traffic” option near the top of the Wordfence
   options page, to remove the code, but another plugin or the child theme may need
   to be updated or fixed to prevent other issues or resolve it permanently.
 * -Matt R
 *  Thread Starter [Armshouse Group](https://wordpress.org/support/users/armshous/)
 * (@armshous)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-on-login-page/#post-7266978)
 * Hello Matt,
 * That seems to be it. I updated the site-specific plugin which styles the login
   and all is good.
 * Thanks for your help.
    AG

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

The topic ‘Code on login page’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Armshouse Group](https://wordpress.org/support/users/armshous/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/code-on-login-page/#post-7266978)
 * Status: resolved