wedocs icon indicating copy to clipboard operation
wedocs copied to clipboard

Is there a way to allow comments in the theme?

Open fg21979 opened this issue 10 years ago • 5 comments

Hi, is there a way to have the default comments enabled?

fg21979 avatar Jan 27 '15 04:01 fg21979

Right now, NO. Documentation theme doesn't need a comment section, so the comment template was deliberately removed. You can add my modifying the template though.

tareq1988 avatar Apr 22 '15 04:04 tareq1988

If you want them on single posts (very likely) add this code to the bottom of /templates/content-single.php

            <?php
            // If comments are open or we have at least one comment, load up the comment template.
            if ( comments_open() || get_comments_number() ) :
                echo '<div class="row"></div class="col-md-12">';
                comments_template('/templates/comments.php');
                echo '</div></div>';
            endif;
            ?>

A good location would be just above the closing article + div tag

            </div><!-- .col-md-# -->
    </article>
<?php endwhile; ?>

status201 avatar Sep 06 '15 14:09 status201

Thanks!

fg21979 avatar Sep 19 '15 02:09 fg21979

@status201 your solution worked. but when there is at least one comment bellow error showing under the page with out comment or new comment text boxes. any thoughts?

One Response to “Fail safe and fail fast in iterators. A.K.A Concurrency handling in collections” Fatal error: Class 'Roots_Walker_Comment' not found in /home/s51sb368/public_html/wp-content/themes/wedocs-master/templates/comments.php on line 11

i can see this class in lib/comments.php

UPDATE: this is fixed. problem was function.

krish avatar Nov 25 '15 04:11 krish

Good for you @krishantha

status201 avatar Nov 25 '15 15:11 status201