Am currently using WordPress 4.6.1 with a custom theme created by me. Am using Theme My Login plugin for front-end user profile page. The scripts needed for generating passwords are not loading with my custom theme.

When I switch the theme to default theme the below script loads

<script type='text/javascript' src='http://localhost/priya/wordpress/wp-admin/load-scripts.php?c=1&amp;load%5B%5D=admin-bar,password-strength-meter,underscore,wp-util,user-profile,wp-embed&amp;ver=4.7.2'></script>

and generate password works.

But switching to my custom theme does not load the above script.

  • Thank you for your answer TrubinE, I already tried adding the scripts using wp_enqueue, but the feature is not working. The script has to be loaded in the below way. <script type='text/javascript' src='localhost/priya/wordpress/wp-admin/…> – Priyadarshni Feb 20 '17 at 5:53
 * add script
 * https://developer.wordpress.org/reference/functions/wp_enqueue_script/
function youplugin_add_frontend() {
    // js
    wp_enqueue_script('youplugin-js', get_template_directory_uri() . '/js/scripts.js', array('jquery'), 0.1, true);


// add script
add_action('wp_enqueue_scripts', 'youplugin_add_frontend');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.