The form appeared un-styled because the login_enqueue_scripts hook does not run on the front-end/non-admin side ( unless you do do_action( 'login_enqueue_scripts' ) in your template ).
So try using wp_head instead: add_action('wp_head', 'custom_login_form');.
You should also add the custom CSS only on the app page, or when the template being used is app.php. For example, you can add this check at the top in your custom_login_form function:
// Do nothing if the template is not app.php.
// This will work the file is at wp-content/themes/your-theme/app.php.
if ( ! is_page_template( 'app.php' ) ) {
return;
}
Related Posts:
- How to change login labels
- Unable to login using username
- error at login page in wordpress
- loginout function customization
- Show errormessages on wrong username/password on custom loginform?
- How to replace ACTION url from original wordpress login form?
- Unable to login after registration
- True email confirmation for registration (keeping unvalidated users from user table)
- Redirect after login to current URL
- How to request login for user but not for bots
- Condition OR for current user ID
- How to retrieve the current post’s generated featured image size?
- If user is logged-in display/hide something
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Where do I store custom functions that call custom page template files?
- Why There Is No “get content by ID” Function
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- Wp-query Order By problem
- Create custom function for hero image
- Randomizing wp_tag_cloud() in child theme
- Secondary Menu and Logged In Users
- login_headertitle is deprecated since version 5.2.0
- How to append classname to body tag if guest user
- Where do I go to edit this area? [closed]
- Prevent WordPress Automatic Logout
- Replace plugin function with a custom function?
- Add attribute only to first image of every post via functions.php
- Add Login/Logout Menu Item to Primary Nav “My Account” Submenu [Woocommerce] [closed]
- Different favicon on different pages
- The_content and Preg_replace in loaded Iframe [closed]
- Logout Redirect and also WP-login.php Redirect
- Problem with images URL after filter applying
- two search forms on the same page
- Function to replace comment’s accented characters before posting
- Insert a field with PREG_REPLACE – strange behaviour
- How to echo Widget Title in Custom Frontend-Template Box
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- how to display a page before the home page
- Add Login and logout buttons to top menu bar
- Function to check if custom page is used by page?
- implementing a centralized content “show-do-not-show” toggle?
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- WordPress – using sessions?
- WordPress login set cookie that survive browser exit (wp_signon function)
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- Prevent wp_signon redirect on failed login for ajax login
- How to redirect Subscribers on login to specific page, when logging in from a Page
- How to remove font awesome from loading in wp theme
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- Header menu aligned right on all pages except for single-post page [closed]
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Modifying a WordPress Plugin
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- CF7 select value get to function and reciept value from function
- Hide author info in single posts by certain users
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- CSS style and app.js not loading
- Allow logged in user to view a Page, else send to login screen and then redirect back to Page
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- Parent category as WOOCommerce Categories widget title
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- Shortcode to insert default text and change one word throughout it?
- I want to customize the_posts_navigation function by replacing prev and next with images
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- How to change form action of wp-login page with a function
- How would I correctly implement a new if statement in a child functions file?
- Woocommerce custom calculation function
- Remove all video attachment, both files and post/postmeta from database?
- WordPress Ajaxifying not working properly
- WordPress function with attribute pass to template
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- Replace image attributes for lazyload plugin on image elements with specific class
- Adding A New Widget to WordPress Disables the Existing Widgets
- How To Show Shortcodes In WordPress Custom Fields?
- Help! Need a different logo on my main page from my other pages
- Display page number on custom page title function
- How to make an If Else on Excerpt Filter
- How to replace words in my posts and saved new words
- How do I integrate my Child Theme into a Custom Template?
- Shortcode to eliminate and replace with
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Login functions
- Add functionality to post editor
- custom post with loading script per single post
- WordPress permanently logging users out
- disable WP_error: authentication_failed
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- child_of not working while searching
- functions.php / replacing div’s with new ones?
- Why does modifying my functions.php file always result in a server error
- is_user_logged_in() isn’t working
- update_user_option not working as expected
- Post variables not displaying correctly in custom function
- “Headers already sent” while trying to add a CSS file to my login page?
- Remove snippets of JS from core