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

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] Problem integrating wpdisquz comments to TutorLMS

17 Posts
4 Users
2 Reactions
1,453 Views
Posts: 7
Topic starter
(@alejandrogm)
Active Member
Joined: 4 years ago

Hello, as you can see here, I'm having the same problem presented here.

I tried everything in the mentioned thread but couldn't get it to work.

Can I have some help from you?

Thank you!

Topic Tags
16 Replies
Asti
Posts: 8075
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

@alejandrogm,

Please leave a screenshot of the changes you've made. 

10 Replies
(@alejandrogm)
Joined: 4 years ago

Active Member
Posts: 7

For sure.

I updated the functions.php, the content.php from tutor and the conf in the form.

Thank you!

(@alejandrogm)
Joined: 4 years ago

Active Member
Posts: 7
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@alejandrogm,

Your WordPress theme footer php file (for this custom post type) must contain <?php wp_footer(); ?> function to allow all plugins load JS files and scripts.

 

Please check and make sure it exists.

(@alejandrogm)
Joined: 4 years ago

Active Member
Posts: 7

@asti It does load the footer.

Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@alejandrogm,

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. 

(@alejandrogm)
Joined: 4 years ago

Active Member
Posts: 7

@asti I shared the access. Did you guys have any chance to look a it?

Thank you!

Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@alejandrogm,

Please leave the email subject here to allow us easily find it. 

Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

Ok we've found the email. We'll check and back to you asap. 

Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@alejandrogm,

We've found the reason for the issue. One of the active plugins or a theme blocks the comments_open() property. 

We've added the following hook code in the active theme functions.php file:

add_filter('comments_open', function ($open, $post_id) {
    if (get_post_type($post_id) === 'lesson') {
        $open = true;
    }
    return $open;
}, 999, 2);

It solves the issue.

You can either keep the code or try to find the problem maker by disabling the theme/plugins one by one. 

(@alejandrogm)
Joined: 4 years ago

Active Member
Posts: 7

@asti Great! Thank you ver much for your help.

Posts: 1
(@dwilson)
New Member
Joined: 4 years ago

Hi @alejandrogm can you please guide me how to install wpdiscuz in my tutorlms site as well. I will very much appricate it.

4 Replies
(@alejandrogm)
Joined: 4 years ago

Active Member
Posts: 7

@dwilson sure:

1. Install the plugin

2. Go to the functions.php on your theme and add

function my_wpdiscuz_shortcode() {
    $html = "";
    if (file_exists(ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php")) {
        ob_start();
        include_once ABSPATH . "wp-content/plugins/wpdiscuz/themes/default/comment-form.php";
        $html = ob_get_clean();
    }
    return $html;
}
add_shortcode("wpdiscuz_comments", "my_wpdiscuz_shortcode");


add_action('init', 'comment_support_for_my_custom_post_type');
function comment_support_for_my_custom_post_type(){
	add_post_type_support('lesson', 'comments');
}

add_filter('comments_open', function ($open, $post_id) {
    if (get_post_type($post_id) === 'lesson') {
        $open = true;
    }
    return $open;
}, 999, 2);

3. Create a child theme of tutor inside your theme

4. To add comments on the preview of lessons on your child theme go to /tutor/single-preview-lesson.php and to add only in private lessons go to /tutor/single/lesson/content.php

and after <?php tutor_next_previous_pagination(); ?> add:

	<?php echo do_shortcode('[wpdiscuz_comments]'); ?>

That's it.

Hope it works.

(@natalials)
Joined: 4 years ago

New Member
Posts: 2

@alejandrogm Hi! How are you?

I followed the steps, but I don't know what I'm doing wrong. 

I attach a photo. Can you help me please? 

 

image
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@natalials,

Please navigate to Dashboard > wpDiscuz > Forms admin page, edit the form, and make sure the "Display comment form for post types" option is enabled for the post types. 

(@natalials)
Joined: 4 years ago

New Member
Posts: 2

@asti Thanks! It works! 

Thanks a lot!

Share: