Title: Do not add any inline script in theme
Last modified: August 4, 2025

---

# Do not add any inline script in theme

 *  [sandeepjainlive](https://wordpress.org/support/users/sandeepjainlive/)
 * (@sandeepjainlive)
 * [10 months, 1 week ago](https://wordpress.org/support/topic/do-not-add-any-inline-script-in-theme/)
 *     ```wp-block-code
       <script>/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);</script>
       ```
   
 * this code in astra/inc/core/class-astra-enqueue-scripts.php , please add by wp_enqueue_scripts
   asap

Viewing 1 replies (of 1 total)

 *  [Aradhy Singh](https://wordpress.org/support/users/bsfaradhy/)
 * (@bsfaradhy)
 * [10 months, 1 week ago](https://wordpress.org/support/topic/do-not-add-any-inline-script-in-theme/#post-18587674)
 * Hi [@sandeepjainlive](https://wordpress.org/support/users/sandeepjainlive/),
 * Thank you for reporting this! I have forwarded this to our developers and added
   it to the internal list. They will have a look at it as per the sequence. I will
   update this thread once I have anything to share.
 * Kind regards,
    Aradhy 😊

Viewing 1 replies (of 1 total)

The topic ‘Do not add any inline script in theme’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.4/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Aradhy Singh](https://wordpress.org/support/users/bsfaradhy/)
 * Last activity: [10 months, 1 week ago](https://wordpress.org/support/topic/do-not-add-any-inline-script-in-theme/#post-18587674)
 * Status: not resolved