The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] How to remove WPDiscuz from top admin bar when logged in?
How-to and Troubleshooting
(@supertrooper)
Trusted Member
Joined: 5 years ago
The top admin bar is already quite overcrowded, and there is no need to access WPDiscuz settings from each post when logged in.
Therefore I would like to remove WapDiscuz from the top admin bar but cannot find this option in the settings.
Please advise.
(@asti)
Illustrious Member
Joined: 8 years ago
(@supertrooper)
Trusted Member
Joined: 5 years ago
After inserting the following code into the functions.php file a critical error is given:
jQuery(document).ready(function(){
jQuery('li#wp-admin-bar-wpdiscuz').remove();
});
i.e. it doesn't work.
Surely there should be an option in the settings to suppress this intrusive link in the admin bar?
Please advise a solution, which works properly.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8192
Dec 29, 2021 9:18 am
@supertrooper,
Please attentively read the post. It's a JS code. Never put the JS code in the functions.php file. Just follow the solution provided in the article: https://www.wpbeginner.com/wp-tutorials/how-to-easily-add-javascript-in-wordpress-pages-or-posts/
(@supertrooper)
Trusted Member
Joined: 5 years ago
@asti
The code in the link had to be modified to make it work in the header (without the script tags it doesn't work).
<script>
jQuery(document).ready(function(){
jQuery('li#wp-admin-bar-wpdiscuz').remove();
});
</script>
I would recommend that you make this an option in the settings, so that persons unfamiliar with code, can easily make this change themselves without having to issue a support request.
Thanks for confirming and for the great support.