Forums

How can I use different comments.php pages? (11 posts)

  1. tomasi514
    Member
    Posted 1 year ago #

    I want to use different comments.php pages depending on pages.
    We normally insert <?php comments_template(); ?> to show comments, when I try <?php include (TEMPLATEPATH . '/comments.php'); ?>, it does not show comments (it only displays form to add a new comment.
    What did I do wrong here?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Personally I'd try using comments.php as a controlling file with all of the conditional statements and conditional includes.

  3. tomasi514
    Member
    Posted 1 year ago #

    Thanks Esmi, what I want to do is make 2 different pages for a french + an english version of comments section, can I do this on comments.php page, does the page contain all english I want to translate? (number of comments, presentation of comments, post a comment form)

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    does the page contain all english I want to translate?

    It varies from theme to theme but, in theory, yes it should.

  5. tomasi514
    Member
    Posted 1 year ago #

    All right, I made the changes in the comments.php page with a if condition, works fine.
    I had to remove the "says:" in the comments-template.php page, I still need to erase "at" between each comment date and time.

    Is there a simple way not to indicate the hour (but I need the date) for comments?

  6. tomasi514
    Member
    Posted 1 year ago #

    Sorry for my english, I mean "time", not "hour" ;)

  7. tomasi514
    Member
    Posted 1 year ago #

    I can delete time in the admin, putting an empty custom box for time, but "at" still displays, how can I get rid of it or change it?
    What is the page to make this correction please?

  8. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    If your comments.php file use wp_list_comments, the only way to do this is to create a custom callback function to display your comments.

  9. tomasi514
    Member
    Posted 1 year ago #

    aouch ;)
    Is there an easy way to understand how I can do this?
    Thanks again

  10. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    http://www.problogdesign.com/wordpress/advanced-wordpress-comment-styles-and-tricks/

    is a tutorial I borrow from to do stuff with my comments (it discussed custom callback functions)

    Maybe its of some use?

  11. tomasi514
    Member
    Posted 1 year ago #

    Thanks a lot Rvoodoo (nice nick ;), I'll have a look.

Topic Closed

This topic has been closed to new replies.

About this Topic