• Resolved mitchg

    (@mitchg)


    I’m using the latest version 2.0.4.

    And, as with earlier versions, when someone posts an article, until someone posts a comment, the link at the end of each article / topic says; “No Comments.”

    I would like it to say; “Post Comments.”

    Can someone advise me what file that I would need to modify, in order to swap the word “Post” with the word “No?”

Viewing 13 replies - 1 through 13 (of 13 total)
  • Most likely your index.php in the theme folder. Keep in mind not to ask design and theme code specific questions without provindig information (aka link).

    Your answer proves only that you know how to do this but are unwilling to share that knowledge with someone who doesn’t.
    I agree “most likely” that file is in the index.php theme folder.
    So it is. What do I do with it when I find it. I looked at that file and tried to find where the “No Comments” entry is defined — and I couldn’t find it.
    Why can’t you just answer the question? What good does a link do in this case?
    There are now 2 of us looking for this and other answers. I at least start out impressed that you know more than I do about this. Is that sufficient to warrant an answer?

    Not necessarily a link but at least mentioning which theme is active – might help. Not all themes are coded in the same way.
    However if you looked at the index file of your theme (and if it displays a No comment string) there should be something like:
    <?php comments_popup_link( 'No comments ','1 comment ','% comments ','comments-link ','Comments are off for this post '); ?>
    or something similar… Find the “no comment” in it and edit.

    Thanks. I can’t speak for the original poster, but I use WP 2.0.4 Default Theme.
    Dashboard>Presentation>Theme Editor>Popup Comments>
    Editing comments-popups.php

    I am surprised to see my copied html from my php file in “no comments yet” and “Post comments” is now read as html as translated, not as it is written, but hopefully you will get the point.

    I find:

    <?php } else { // this is displayed if there are no comments so far ?>
    No comments yet.

    It seems obvious that I would change No comments yet.
    to Post comment. to achieve the goal stated.

    BUT in reality my blog posts read “No Comments”, NOT “No Comments yet” so I wonder if this is the right place to make a change.

    Under Index.php I found nothing similar. Should I look more carefully there?

    Thanks for your help. This is certainly much more helpful than earlier response.
    <?php } ?>

    “No comments” is the default output for the comments_popup_link() template tag. If nothing is set for that value, this is what is displayed. See the Codex doc on the template tag for more:

    https://codex.www.ads-software.com/Template_Tags/comments_popup_link

    Color me “slow.”
    I follow your link to exactly where it says it will take me. I then select 3.1 and it takes me to:
    Text Response for Number of Comments (looks like the right place to me)

    Displays the comments popup link, using “No comments yet” for no comments, “1 comment so far” for one, “% comments so far (is that a lot?)” for more than one (% replaced by # of comments), and “Comments are off for this post” if commenting is disabled. Additionally, ‘comments-link’ is a custom CSS class for the link.

    <?php comments_popup_link(‘No comments yet’, ‘1 comment so far’,
    ‘% comments so far (is that a lot?)’, ‘comments-link’, ‘Comments are
    off for this post’); ?>
    I understand all this I THINK.
    I also think I found this same code as mentioned in my earlier post.
    AS I UNDERSTAND THIS (AND I’M QUITE OBVIOUSLY WRONG), my blog should read, if there are 0 comments, “no comments yet”. It doesn’t. It reads AS YOU SAY the default output, No Comments.
    SO — I obviously am in the wrong place in my blog code or that code is somehow being superseded by another code.
    The result is the same: I still can’t modify my blog to read “Post Comment”.
    Thanks for continuing interest and help.

    Thread Starter mitchg

    (@mitchg)

    I’m not sure if I have found the right place to edit the “no comments”???

    But, if you go to the wp-includes folder and open the comment-functions.php file in an editor, on line 240 it appears to define the “comments number” and on line 280 it appears to define the “comments popup link.”

    chantz

    (@chantz)

    MitchG,
    I also tried changing that code you mentioned in your last thread and it didn’t work. Did you ever figure out where to make the change?

    Thread Starter mitchg

    (@mitchg)

    Chantz,

    I was really hoping that I had it figured out… But, it didn’t work for me either.

    I’m scratching my head on this one. I’m sure it’s something simple. I just haven’t had the time to sit down and view every php file, in the wp-admin, wp-content and wp-includes folders.

    BTW, I am using the default theme, with very minimal modifications. I utilized tables for the header and the footer and made a few tweaks to the CSS… https://www.swedetechracing.com/news-events/

    katgirl

    (@katgirl)

    You don’t need to change anything in wp-admin. Just your theme files.

    Go to: Admin >> Presentation >> Theme Editor >> (select) Default (Kubrick)

    Kubrick – Main Index.php
    Open index.php and search amongst the code for any reference to comments. It looks something like this:

    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>
    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    </div>

    Change the No Comments to whatever you want. Save.

    Open Kubrick >> archive.php
    Find this:
    <div class="entry">
    <?php the_content() ?>
    </div>
    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>

    The default theme (Kubrick) has these comment php codes as standard. If you haven’t changed your default theme, or uploaded a modified version or some else’s version, then the Comment code will be there.

    scooper

    (@scooper)

    You solved my issue. Thanks to all of you for your help. It worked on my Tiga theme. https://www.pathtopurity.com

    scooper

    (@scooper)

    BTW, anyone knows how to set the home page so it would display only the first 10 or so lines of each post and add a “READ MORE” link at the end? I’d appreciate any help as I’m new to this. https://www.pathtopurity.com

    Thread Starter mitchg

    (@mitchg)

    Thanks KatGirl… Worked like a charm!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Change No Comments To Post Comments’ is closed to new replies.