Theme My Login
[resolved] Possible to Only Load Inline JS on login page? (3 posts)

  1. Dominic
    Posted 4 years ago #

    Hello, I asked a similar question a couple days ago about only loading the CSS on the login page, and you pointed me to the setting to remove the CSS completely. I was wondering if something similar could be done to the inline Javascript that is printed on the footer of each page. One solution, that I can see would be to add an if statement before the code is printed like the example I have at the bottom of the post.

    Of course, this would prevent auto focusing on the widget which is why I assume you are including it on every page. Maybe an option could be added like you have for the CSS file, so if we are not using the widget we don't have the javascript printed in the footer?

    [Code moderated as per the Forum Rules. Please use the pastebin]

    With check:


  2. Jeff Farthing
    Plugin Author

    Posted 4 years ago #

    You will need to use a conditional statement to remove the action hook that adds the script.

  3. Dominic
    Posted 4 years ago #

    Ok, thanks for the tip. I will approach it from that angle.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Theme My Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic