WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Miniposts] Customising the comments link when there are 0 comments to "leave a reply" (15 posts)

  1. Lovelidicious
    Member
    Posted 5 years ago #

    I was wondering if it it possible to change the comments link when there are 0 comments.

    For example, when we have 0 comments now, it shows up as 0, it is possible to customise it such that when there are no comments it shows up as "leave a reply".

    http://wordpress.org/extend/plugins/miniposts/

  2. erigami
    Member
    Posted 5 years ago #

    Would it be possible to do that with CSS? If the comment link had the number of comments as a style, you could add a rule to your style sheet that would set the content of the node to be "Reply" rather than "0".

    How does that sound?

  3. Lovelidicious
    Member
    Posted 5 years ago #

    Hmmm.. I think I get what you mean but I am not sure how to do that via CSS. :(

    I just feel that it will be much easier if we can customise it via the admin panel or something. But as long as it can be done, I think it's fine. Thanks so much for considering this. :)

  4. erigami
    Member
    Posted 5 years ago #

    I'll poke around to see what looks easiest. The options page for miniposts is already pretty busy, so I don't want to add more fields if there's another way to do it.

  5. Lovelidicious
    Member
    Posted 5 years ago #

    Okay, hope this can be done, that would make this plugin perfect. Thanks again for writing this plugin. :)

  6. redmondtux
    Member
    Posted 5 years ago #

    I want to disable comments on my miniposts by default, but there isn't an option to do this... What would be the best way to remove that comments (0) and keep comments automatically shut off for miniposts only?

  7. erigami
    Member
    Posted 5 years ago #

    Lovelidicious: I've spun a new version of Miniposts, just for you. The minipost comment count is now displayed in a span, and the outside a has a style with the number of comments in it. You can now add the following to your style:

    .minipost_commentlink_count_0:before {
    content: 'Reply';
    }

    .minipost_commentlink_count_0 .count {
    display: none;
    }

    What this does: adds the text 'Reply' to the start of the comment link, then hides the number.

  8. erigami
    Member
    Posted 5 years ago #

    @redmondtux: Don't hijack other people's threads.

  9. Lovelidicious
    Member
    Posted 5 years ago #

    Right, thanks so much erigami for taking the effort to do this. But do I have to update the plugin to a new version or something? Or it just works by adding that to my stylesheet? :)

  10. erigami
    Member
    Posted 5 years ago #

    Lovelidicious: You have upgrade to version 0.6.11 of the plugin. The appropriate styles weren't written in previous versions.

  11. Lovelidicious
    Member
    Posted 5 years ago #

    Thanks so much erigami! It is working perfectly now. :)

    Just a note, I think the version number on the plugin page is incorrect as it shows up as version 0.6.9.

  12. Lovelidicious
    Member
    Posted 5 years ago #

    Edit: Okay, it's working correctly in Firefox, but the link does not shows up in IE 7. Is there a fix for this? :(

  13. erigami
    Member
    Posted 5 years ago #

    Lovelidicious: Sorry. I don't have access to IE7, so I can't test on it.

    I did a quick search and found: http://dean.edwards.name/IE7/ - JS lib for IE7 to emulate full CSS compliance. There are probably other hacks around as well.

  14. Lovelidicious
    Member
    Posted 5 years ago #

    Right, I'll need to check that out tonight. Thanks for the tip. So basically adding that code and js library to the website would make the CSS you posted above works right? Thanks :)

    I still think it would be good to have it customised via the admin panel, but this works too, will try it out tonight. Thanks, really appreciate the help and effort :)

  15. Lovelidicious
    Member
    Posted 5 years ago #

    erigami: Thanks for the link. The JS lib for IE 8 works, the link can now be viewed in firefox, ie 7 and opera. It's working perfectly now. Thanks so much! :)

Topic Closed

This topic has been closed to new replies.

About this Topic