• Resolved tristanjenner

    (@tristanjenner)


    As title suggests. I want to enable comments on single person pages. Is it possible to do that using my theme’s functions.php?

    • This topic was modified 3 years, 5 months ago by tristanjenner.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @tristanjenner ,

    You can enable single person comments in single person setting page.

    Ref : https://drive.google.com/file/d/1XGs0-Qw1tIMbx056bWQpkBRsCcMBHubw/view?usp=sharing

    Regards

    Thread Starter tristanjenner

    (@tristanjenner)

    Thanks for the response. That’s the first thing I tried while troubleshooting but that didn’t work. I checked the Allow Comments box on all the persons I added but the comment form doesn’t show up.

    Thread Starter tristanjenner

    (@tristanjenner)

    I took a look at the plugin’s codes and I found that the template for single person doesn’t have any code that calls for the comments_template. After a lot of trials and errors, I came up with this code, which I added to my child theme’s functions.

    /**Single Person Comments Tab**/
    if ( ! function_exists( 'masvideos_single_person_comments' ) ) {
        function masvideos_single_person_comments() {
            ?>
            <div class="single-person-comments">
    			<?php comments_template(); ?>
    		</div>
            <?php
        }
    }
    
    add_action( 'masvideos_after_single_person', 'masvideos_single_person_comments', 27 );

    Now I just need to figure out how to enable comments by default for each new person added.

    Hello @tristanjenner,

    Thank you for getting back and sincerely sorry we cannot give you the correct info earlier. I can verify that we did not hook in the function to display comments in our default person template and hence they were not displayed. Glad you were able to achieve it using custom code through your child theme’s functions.php

    I appreciate you share the code with us. Please do not hesitate to reach us if you have any questions related to our plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Enable Comments on Single Person Page’ is closed to new replies.