Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
Hi Robin,
thanks for your reply.
I entered that code with the Code Snippets Plugin but it didn’t work. Why?
that is a page full of code – so what did you put in?
there are also lots of login customization plugins which may do what you want a whole lot easier
eg
10 Best Custom Login Page Plugins for WordPress 2022
<?php
if ( ! is_user_logged_in() ) { // Display WordPress login form:
$args = array(
'redirect' => admin_url(),
'form_id' => 'loginform-custom',
'label_username' => __( 'Username custom text' ),
'label_password' => __( 'Password custom text' ),
'label_remember' => __( 'Remember Me custom text' ),
'label_log_in' => __( 'Log In custom text' ),
'remember' => true
);
wp_login_form( $args );
} else { // If logged in:
wp_loginout( home_url() ); // Display "Log Out" link.
echo " | ";
wp_register('', ''); // Display "Site Admin" link.
}
?>
I entered that code with the Code Snippets Plugin but it didn’t work 🙁
I saw this:
10 Best Custom Login Page Plugins for WordPress 2022
but there is no option to embed on a page on my site.
Theme my login does not allow embedding.
As I wrote at the beginning of the post, I would like to customize the bbpress login page.
Can you help me run that PHP code with Code Snippets?
Thank you very much!
ok, based on that I have no idea what you mean by embedding.
bbpress does not have a ‘login page’ it has shortcodes and widgets.
the template used by bbpress for login is
bbpress\templates\default\bbpress\form-user-login.php
to customise :
find
wp-content/plugins/bbpress/templates/default/bbpress/form-user-login.php
transfer this to your pc and edit as desired
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress
where %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/form-user-login.php
bbPress will now use this template instead of the original
Ok, thanks! Where I can edit the text: “Prove that you are a human being”?
that is not part of bbpress.