The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Remove Ratings From...
 
Share:
Notifications
Clear all

Question Remove Ratings From Specifc Posts

15 Posts
2 Users
0 Reactions
410 Views
Posts: 10
Topic starter
(@dstr33)
Active Member
Joined: 4 months ago

How can I show the post rating on only certain post categories? 

I have a membership site and only want to show the rating on certain posts and not on the ones in the blog category.

I am using the stand alone post rating. 

 

Topic Tags
14 Replies
Asti
Posts: 7257
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi,

You can create two separate comment forms and enable the 'Post Rating' option only for specific post IDs.

For instance, let's say you create a separate comment form named 'With Post Rating'. In this form, you should configure the following options:

Reply
13 Replies
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti It appears there is an issue. I created two forms: one associated with post ID 21 and the other with post ID 839. For the form linked to post ID 21, I configured it to hide ratings. Conversely, for the form linked to post ID 839, I enabled the display of ratings. In both forms, I made sure to mark the post box.

However, the outcome is not as expected. Only comments are visible on the form for post ID 839, without any ratings displayed. For the form associated with post ID 21, neither comments nor ratings are visible.

Could you advise on how to resolve this problem?

 

 

 

 

Here is a post from id 21

https://soundshockaudio.com/every-free-lofi-sample-pack-ever-created/

Here is a post from id 839

https://soundshockaudio.com/chowmultitool/

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7257

@dstr33,

You should uncheck the post type from the option located above the "Display comment form for post IDs". 

Reply
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti I unchecked the post type above the "Display comment form for post IDs" for both forms and it didn't work. The ratings and comments don't show up on either post category

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7257

@dstr33,

We don't find such an issue on our test websites. Could you please send the admin login details to info[at]gvectors.com email address? I'll ask the developers to check the issue for you.

Reply
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti Thank you. I just sent the email with login details.

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7257

@dstr33,

Please send the URLs of the posts as well. You have many posts, so we can't find those. 

Reply
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti Oh yes sorry about that. I just sent an email with the urls and the cateogry ids for these urls

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7257

@dstr33,

It seems like you've set the category ID in the 'Display comment form for post IDs' field. This is not correct. The option is not designed to work that way; it's intended for post/page IDs, not for category IDs. You should comma-separate the specific post IDs in the field.

Reply
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti I have thousands of posts on my site. How can I automatically set a form to a specific cateogory?

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7257

@dstr33,

I'll ask the developers if there's a straightforward solution we can offer you. I'll update this topic once I get a response from them. 

Reply
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti Thank you!

Reply
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7257

@dstr33,

You can use the is_load_wpdiscuz hook for this customization. More info here: https://wpdiscuz.com/docs/codex/filters/is_load_wpdiscuz/  

Reply
(@dstr33)
Joined: 4 months ago

Active Member
Posts: 10

@asti This almost worked. I want to have only comoments on one category id 21 and comments and ratings on category id 839

I added the hook below and was only able to make wpdiscuz show up on category 839

add_filter("is_load_wpdiscuz", function ($load, $post) {
    // Check if the current post is in the category with ID 21 (Blog)
    if (has_category(21, $post)) {
        // Return false to prevent wpDiscuz from loading on posts in the "Blog" category
        return false;
    }

    // Return the original $load value for posts not in the "Blog" category
    return $load;
}, 10, 2);

Is it possible to have one wpdiscuz configuration on one category and another configuration on another category?

I experimeted with different configurations of the two forms I have for the two categories but coulnd't find out how to do this. 

 

Reply
Share: