Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7026

    Hey,

    is it possible to add an Commentfield under the content on an normal Page (none article).

    #56329

    Hey,

    open up page.php and replace:

    echo "</div><!--end inner_box-->";

    with:

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

    echo "</div><!--end inner_box-->";

    #56330

    Hmmm,

    but what happend if I want the commentfield only on 2 of 5 normal pages?

    #56331

    Then you’ll have to create a new page template and assign that template to your page. Simply copy the template file normally used by your pages, then rename it and put the commenting in. Now, you’ll be able to use a template with & a template without comments. *Note sometimes the comments mess up on pages that weren’t intended to have comments.

    #56332

    Alright, works fine.

    But one last question.

    How can I add in that new page-template with the comments filed the seperator tag above? (<div class=”hr hr_post_seperator”></div>)

    //wordpress function that loads the comments template “comments.php”

    echo “<div class=”hr hr_post_seperator”>”;

    comments_template( ‘/includes/comments.php’);

    echo “</div><!–end inner_box–>”;

    is not working…..cause I´m not the php guy ;-)

    #56333

    You’re using double quotes for your echo’s and for your classes. Try

    <div class="hr hr_post_seperator">

    See the backslashes? These make sure the quotes are read as you intend them to be read.

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

The topic ‘Add Comment-Field on Pages’ is closed to new replies.