Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7666

    Hi guys,

    Is it possible to add a ‘comments’ section to certain pages? I’ve looked at some other threads on this and they don’t seem to fit with Broadscope’s coding.

    I know technically you shoud use posts, but commenting on some pages would be nice too.

    Thanks

    Tim

    #58833

    Hey,

    in page.php replace following line:

    get_template_part( 'includes/loop', 'page' );

    with:

    get_template_part( 'includes/loop', 'page' );

    //wordpress function that loads the comments template "comments.php"
    comments_template( '/includes/comments.php');

    #58834

    Hi dude,

    That worked nicely (although the comment section was right-aligned for some reason), but it add’s it to all pages.

    How can I add it to just certain pages? (basically, about half the pages on my site) and get it aligned properly as well.

    Thanks again

    Tim

    #58835

    Hey,

    you can copy the page template, apply the previously mentioned code and save it as an entirely new template (like “template-withcomments.php” – this way you can apply page templates to pages/posts with the same looks but with or without comments.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Add Comments to Certain Pages’ is closed to new replies.