Hi,
I need to change login page to comment on Wp Discuzz plugin because i've hide wp-login.php page.
Is it possible?
Hi @chussman,
You should put a small code in theme functions.php file. Please read this support topic and change the /login slug to whatever uses the plugin:
https://wordpress.org/support/topic/change-link-for-login-link-text/
Hi,
Thanks for you response, very fast! Congratulations.
I've added this code on functions.php
but i have a problem, i'm going to Home after login, and i would like to redirect to same post to start to comment.
How i can fix this issue?
Hi again,
I think i can resolve my new issue, i only need add a custom class to <a> link login.
How i can add it??
Thanks so much!
Just add the following js code in your active theme's js files:
jQuery( ".wpdiscuz-form-top-bar span a" ).addClass( "myClass" );
@astghik
Thanks so much, i will try to do it, but i have to looking for how to do it first.
So, i have a new problem: When user is logged in, the username has a link to his profile, i've disabled profile url from plugin options but it doesn't works.
Can you help me?
There are two following options:
1. You can use the following CSS code:
#wc_show_hide_loggedin_username a:first-child {
color: currentColor;
cursor: not-allowed;
text-decoration: none;
pointer-events: none;
}
The CSS code should be added in the Dashboard > Comments > Settings > Styling > "Custom CSS code" textarea.
2. or you can use the following JS code:
jQuery( "#wc_show_hide_loggedin_username a:first-child " ).removeAttr("href");
The js code you should add in your active them's js files.
In any case, please don't forget to delete all caches and press Ctrl+F5 (twice) on the frontend before checking to reload the updated CSS/JS files.
@astghik
Hi, thanks for your response, but i don't know how to add JS code on my theme.
Im using Avada theme, can you help me? Thanks!
You can follow this instruction:
https://www.collectiveray.com/wp/tips/add-javascript-to-wordpress
@astghik
Hi! Thanks for your response. Im registered a custom JS file on my website and it's loading fine, but i think the JS file is not correct.
My JS file only has this content, I don't have Javascript knowledge, sorry:
add_action( 'wp_head', function () { ?>
<script>
jQuery( ".wpdiscuz-form-top-bar span a" ).addClass( "lrm-login" );
</script>
<?php } );
But is not doing anything
🙁
Using this code you've just added class to the element:
jQuery( ".wpdiscuz-form-top-bar span a" ).addClass( "lrm-login" )
Now you'll need to add some CSS rules if you want to see the result.
For example:
.lrm-login{
color: red !important
}
The CSS code should be added in te Dashboard > Comments > Settings > Styling > "Custom CSS Code" textarea.
@astghik
Hi im using your code:
jQuery( "#wc_show_hide_loggedin_username a:first-child " ).removeAttr("href");
to remove link but i have an issue:
When im logged in, the <a> tag continues displaying but without link and the hover effect is displaying, so i change my css code to:
#wc_show_hide_loggedin_username a {
color: #000 !important;
}
#wc_show_hide_loggedin_username a:hover {
color: #000 !important;
}
But the "Exit" link loose the hover effect too.
Is possible to remove <a> in username when is logged in??
Please follow these steps below:
1.Delete the CSS codes, added by you:
#wc_show_hide_loggedin_username a {
color: #000 !important;
}
#wc_show_hide_loggedin_username a:hover {
color: #000 !important;
}
2. put following CSS code in the "Custom CSS code" textarea:
wc_show_hide_loggedin_username a:first-child:hover{
color: #000 !important;
}
Please don't forget to delete all caches before checking.