• Hello

    Version : 1.5 alpha 6 last CVS
    I can have a page based on a template, but even if
    – in the admin/write page the comments checkbox is checked
    – and in my template I have :
    < ?php
    $comments = "open";
    comments_template(); // Get wp-comments.php template ? >

    The page displays “the comments are closed

    Any tip ? were did I do wrong ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff

    (@macmanx)

    I’m a bit confused. I went to your page and it appears to be working correctly.

    Thread Starter lstelie

    (@lstelie)

    @macmanx

    Se for example :
    http://blog.saint-elie.com/generique/

    This is a “page” , note a “webpage”, but a “page” in WP 1.3/1.5 sense of the word.

    To build pages you have two solutions :
    – use the database as for any normal entry
    – use your own PHP file and store it in the theme folder. In this case the PHP file must start by :
    <?php
    /* Template Name: TEMPLATE_NAME

    To be viewable in the admin panel popup menu

    Using you own php file is handy when you need php code in the page. For example my contactr page is built this way (it contains a form for sending mail).

    In the later case, if you want to create a page based on a php file, when creating a new page from the admin section, you juste need to specifiy :
    – the title of the page
    – the template to use
    – if you want or not pings or comments

    In my example, the comment check box is checked but they are no comments

    If at the end of my php file I add :
    < ?php
    $comments = "open";
    comments_template(); // Get wp-comments.php template ? >

    The page displays “the comments are closed” what means that the comments are taken in account (that is not the case by simply checking the “allow comments checkbox”), but for some obscure reason the comments are considered as closed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to have comments in a page based on a template ?’ is closed to new replies.