Notifications
Clear all

Show logged-in user name and logout link on top of main form

9 Posts
2 Users
0 Reactions
2,446 Views
(@hello2019)
Active Member
Joined: 6 years ago
Posts: 9
Topic starter  

I have the same problem. I also tried disabling it through the settings menu, but it changed nothing.


   
Quote
(@hello2019)
Active Member
Joined: 6 years ago
Posts: 9
Topic starter  

I just found the culprit: It happens when "Show logged-in user name and logout link on top of main form" is deactivated. When I activated it again, it worked. Please fix this bug, thank you 🙂


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @hello2019,

Please check the settings on the Dashboard > Comments > Settings > Comment Form admin page make sure all settings are correct. 

  • The "Show logged-in user name and logout link on top of main form" option should be enabled
  • The "Hide "Please login to comment" text" should be disabled.
settings

More info here: https://wpdiscuz.com/docs/wpdiscuz-documentation/settings/comment-form/#user_name_and_logout_link


   
ReplyQuote
(@hello2019)
Active Member
Joined: 6 years ago
Posts: 9
Topic starter  

Is there no way for it to work without the first one being enabled?


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

@hello2019,

Please try to explain one more time what you need to change. 


   
ReplyQuote
(@hello2019)
Active Member
Joined: 6 years ago
Posts: 9
Topic starter  

To disable “Show logged-in user name and logout link on top of main form" and enable "Hide "Please login to comment" text".

 

When the first is disabled however, the second one can’t be enabled. Even if  is, the message that you should login will not be displayed. It only works if “Show logged-in user name and logout link on top of main form" is enabled too. I want to disable that one however.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @hello2019,

Please add the following JS code in your theme's js files and check again. 

if (!jQuery('#wc_show_hide_loggedin_username').children('.fas.fa-sign-in-alt').length) {
jQuery('#wc_show_hide_loggedin_username').remove()
}

   
ReplyQuote
(@hello2019)
Active Member
Joined: 6 years ago
Posts: 9
Topic starter  
Posted by: Astghik

Hi @hello2019,

Please add the following JS code in your theme's js files and check again. 

if (!jQuery('#wc_show_hide_loggedin_username').children('.fas.fa-sign-in-alt').length) {
jQuery('#wc_show_hide_loggedin_username').remove()
}

Thanks! I tried it, but it doesn't work. It is still only displayed if “Show logged-in user name and logout link on top of the main form" is enabled as well.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 7 years ago
Posts: 6147
 

Hi @hello2019,

The code is working fine in our case. Please make sure you've added the js code in right place. 

Please read the following articles, you can find some useful information on how to including JavaScript yo WordPress themes: 

https://www.wpexplorer.com/javascript-wordpress/

https://developer.wordpress.org/themes/basics/including-css-javascript/


   
ReplyQuote
Share:
Scroll to top