WordPress.org

Ready to get started?Download WordPress

Forums

Comments in 1.5/new template (4 posts)

  1. AndWat
    Member
    Posted 9 years ago #

    Hello,
    I'm having a few problems with comments. Two problems in particular are bothering me, and I can't find anything in previous threads here that seems to address them.
    The first problem arises on the single-post page (although it also arises if the main template is used to handle a single post). It looks as though the call to comments_popup_link just doesn't get made when there is just one post. See, for example:
    http://andwat.weblogs.us/archives/5
    Then I get to the comments popup page. It needs a little work, but that's not my main problem with it. The main problem is that, after I leave a comment, WP stuffs the main template into the popup box.
    Thanks in advance for any help,
    Andrew

  2. AndWat
    Member
    Posted 9 years ago #

    After digging around, I found the answer to my first problem. It is that comments_popup_link cannot be called from a post page (single.php). This can be worked round with a small edit to WP source. Thanks to Kafkaesqui, in:
    http://wordpress.org/support/topic.php?id=25853
    While digging, I found that the standard way to deal with comments on a post page is to use comments_template. This appears to be a template tag that just grabs comments.php. Is that right? If so, shouldn't it be listed on:
    http://codex.wordpress.org/Template_Tags
    I still have the second problem I originally reported. After leaving a comment in the popup box, WP stuffs everything, sidebars and all, into the box.
    To add a problem... WP seems to like to give me very wide comment boxes. You can see this is you try to leave a comment at my blog.
    Thanks for any help...

  3. Kafkaesqui

    Posted 9 years ago #

    "This appears to be a template tag that just grabs comments.php. Is that right? If so, shouldn't it be listed on:
    http://codex.wordpress.org/Template_Tags "

    Yes, it should. I'll put it on my list of things to add to the Template Tags index. Thanks.

    For your second problem, this thread might help:

    http://wordpress.org/support/topic.php?id=26015

    On the third, try adding this to your theme's style.css:

    #commentform textarea {
    width: 300px;
    }

    Play with the width value to suit.

  4. AndWat
    Member
    Posted 9 years ago #

    Kafka,
    Thanks again. The comments popup now restricts itself to comments, rather than trying to stuff the whole post page into the popup.
    The #commentform textarea {width
    suggestion didn't seem to affect the width of the text area on the popup, though. Perhaps it refers to the text area summoned by comments_template? (That was ridiculously wide when I tried comments_template.)
    If you are Template Tag Documentation Guy, then you are even more of a hero. And it might be worth an explicit comment on the page on comments_popup_link that it won't work from single.php (with the WP 1.5 code - not sure whether this is seen as something that should be fixed in 1.5.1).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.