Answer the question
In order to leave comments, you need to log in
Wordpress override theme template in plugin?
Good afternoon.
I am developing a theme and an authorization plugin myself.
Tell me how you can create your own authorization form in the plugin? no shortcodes.
I am looking for information in the direction of redefining the page-login.php template in the plugin, but the site pulls the template from the theme.
Found hooks like add_action('login_head', 'custom_loginlogo'); but did not find a hook to redefine all forms of authorization.
Answer the question
In order to leave comments, you need to log in
If you mean the /wp-login.php page, where the authorization block is and the WP logo is on top, then this page does not use a template engine and is not redefined. The maximum that can be done is with the help of a few hooks (there are not many of them by the way) and custom css / js to more or less style for yourself.
An alternative option is to make your entire page and filter the values of the necessary global variables:
- login_url
- logout_url
- register_url
- lostpassword_url
- edit_profile_url
- login_redirect
- logout_redirect
- registration_redirect
- lostpassword_redirect
Read more here .
You can style the login form
https://codex.wordpress.org/Customizing_the_Login_Form
Styling example:
https://md7.info/wp-admin/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question