Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

Remove author's link in comment count  


thanh25896
Posts: 4
(@thanh25896)
New Member
Joined: 2 months ago

I tried add comment counter after author name follow this link

https://gvectors.com/forum/how-to-and-troubleshooting/display-user-comment-number-which-template-for-the-call/

But the comment count have author's link . I want to remove it but I can't although tried many way like 

`.wpdiscuz-comment-count{
pointer-events: none !important;
cursor: default !important;
}`

or

`a..wpdiscuz-comment-count{
pointer-events: none !important;
cursor: default !important;
}`

But nothing chaged . I tried cusor : not-allowed too

6 Replies
Elvina
Posts: 1039
Moderator
(@elvina)
Noble Member
Joined: 9 months ago

Hi @thanh25896,

Please leave the example URL to allow us to check it.

Also please provide a screenshot of what exactly you want to remove.

Reply
thanh25896
Posts: 4
(@thanh25896)
New Member
Joined: 2 months ago

Example IMG

[img] [/img]

 

And the code in it is :

<div class="wpd-comment-header">
<div class="wpd-comment-author ">
<a href="https://asd.com" rel="noreferrer ugc nofollow" target="_blank">tge <span class="wpdiscuz-comment-count"> <i class="fad fa-comments"></i> 10 </span></a>
</div>
Reply
1 Reply
Elvina
Moderator
(@elvina)
Joined: 9 months ago

Noble Member
Posts: 1039

@thanh25896,

There are two following options to do that.

1. You can use the following CSS code:

div.wc-comment-author > a {
color: currentColor !important;
cursor: not-allowed !important;
text-decoration: none !important;
pointer-events: none !important;
}

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-comment-author > a").removeAttr("href");

The js code you should add in your active them's js files.

Here is the instruction on how to add a js file or js code in the active theme:

https://www.wpbeginner.com/wp-tutorials/how-to-easily-add-javascript-in-wordpress-pages-or-posts/

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. 

 

Reply
thanh25896
Posts: 4
(@thanh25896)
New Member
Joined: 2 months ago

If I add this css code the author name will not have author's link anymore . I just want to remove author's link on comment counts only, not on author name .

Reply
1 Reply
Elvina
Moderator
(@elvina)
Joined: 9 months ago

Noble Member
Posts: 1039

@thanh25896,

Please remove all codes provided above and use the following one, to get it resolved: 

jQuery(document).delegate('.wpdiscuz-comment-count', 'click', function (e) {
e.preventDefault();
});

The js code you should add in your active them's js files.

 

Reply
thanh25896
Posts: 4
(@thanh25896)
New Member
Joined: 2 months ago

This code was block open link when clicked into comments count but still show the author link when the cursor move into the comments count

Reply
Share: