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
- When should you, and when should you not, use wp_list_pluck()?
- Woocommerce add to simple product attribute programmatically [closed]
- Custom ReCaptcha Login
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- How can I tell if I’m on a login page? [duplicate]
- Is it possible to use a forgot password url filter?
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Login using the password from protected pages
- Remove tag on my RSS Feed
- Logging in redirects to correct page but shows logged out content until forced refresh
- Theme-Config tab in admin Pannel?
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Remove default user registration, login and subscriber profiles
- Delete pages and Create default pages for all new network sites
- Post thumbnail relative link and HTML modify
- Custom Login and Registration form in Ajax
- How to mass-delete inline styles in WordPress custom post type automatically?
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- PHP files included in functions.php don’t seem to work
- Members only site – still need the lost password page accessible
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- str_replace function in theme
- WordPress custom login page
- Load .txt file for login_message in wp-login.php
- Right way to update widget on dynamic new input field
- Properly customizing login/register form
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Best practices regarding the creation of custom widgets?
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- WordPress PHP Conflicting User Sessions
- Get User Login Data (date, time… )
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- Registration Hooks don’t appear to be working
- A truely custom login page?
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- 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]
- The_content and Preg_replace in loaded Iframe [closed]
- Logout Redirect and also WP-login.php Redirect
- two search forms on the same page
- Insert a field with PREG_REPLACE – strange behaviour
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- how to display a page before the home page
- Function to check if custom page is used by page?
- 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
- 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]
- Hide author info in single posts by certain users
- Re-style Login Form Whilst Keeping CSS Separate from Frontend CSS
- 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 would I correctly implement a new if statement in a child functions file?
- WordPress Ajaxifying not working properly
- WordPress function with attribute pass to template
- 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 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
- Add functionality to post editor
- custom post with loading script per single post
- WordPress permanently logging users out
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- child_of not working while searching
- 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
- Remove snippets of JS from core
- Removing Facebook contact field from user contact not working
- How do I add functionality to images?
- Explode Array from Repeatable Custom Field
- Problem with removing characters “<” – WpAllImport
- How to create a post without link in wordpress?
- multible shortcodes (for differnt values) with one function
- Customizer cuistom CSS Priority ordre Issue
- Simple way to make most of my site private