tareq1988 / wedocs

A documentation theme for WordPress
http://docs.wedevs.com
394 stars 129 forks source link

Is there a way to allow comments in the theme? #7

Open fg21979 opened 9 years ago

fg21979 commented 9 years ago

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

tareq1988 commented 9 years ago

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.

status201 commented 9 years ago

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; ?>
fg21979 commented 9 years ago

Thanks!

krish commented 8 years ago

@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.

status201 commented 8 years ago

Good for you @krishantha