• Resolved peterwgallagher

    (@peterwgallagher)


    Hello Christian

    I’m trying-out CommentPress for a project to “crowd-source” annotations on a long poem that is divided into “Cantos”. Since these are the equivalent of Chapters, I’m using Pages for each Canto. Line-by-line commentary is helpful. Using the default setup for the “Flat” theme, the RH column reports “0 Comments on line…” for every line of the current Canto.

    Is there some modification I can make to disable the display of the comment-count for each line where the count = 0?

    Thank you.

    Peter

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter peterwgallagher

    (@peterwgallagher)

    Oops… “0 Comments ….” line.

    Plugin Author Christian Wach

    (@needle)

    Hi Peter, what would you want to replace the text with? Or would you prefer to hide those elements completely until they have a comment?

    Thread Starter peterwgallagher

    (@peterwgallagher)

    I would prefer the latter, Christian. Hide all ‘Zero comment’ lines but show the comment count of any line on which the number of comments > 0.

    This would look much better, and would be more functional, than hundreds of identical “0 comments…” lines.

    I don’t know of a way to set up such a conditional in e.g. CSS, so it’s beyond my skills, I’m afraid.

    Plugin Author Christian Wach

    (@needle)

    Hi Peter, I have found a weakness in the CommentPress Javascript that prevents me from posting an immediate solution for you. Give me a few minutes and I’ll post a plugin update after which I’ll post a solution to your query.

    Cheers, Christian

    Plugin Author Christian Wach

    (@needle)

    Hi Peter, if you update to CommentPress 3.9.2 then you can simply add the following CSS to your child theme’s stylesheet:

    .no_comments
    {
    	display: none;
    }
    

    If you aren’t using a child theme yet, then I would highly recommend you do so. You can find a “starter pack” on Github:

    https://github.com/christianwach/commentpress-flat-child

    Cheers, Christian

    Thread Starter peterwgallagher

    (@peterwgallagher)

    Hi Christian,

    This is a very generous response. A new version and a child-theme template on GitHub with a simple CSS fix! Sounds perfect.

    I appreciate the value of child themes and have set up one before. But, I have to confess, I found the over-ride wrangling difficult and the structure of the WP processing “cascade” hard to follow. So I’m delighted by the prospect of a template.

    Thanks so much for your help. I’ll get back to you when I’ve done this to show you the test site.

    Thread Starter peterwgallagher

    (@peterwgallagher)

    Hello again, Christian

    Well that works very well. Thank you.

    I tried editing the ‘style-overrides.css’ directly in the child theme folder on-line but that did not seem to have an effect. So I used the ‘customise theme’ facility in WP (on the child theme), which did work.

    I’m still fiddling with format (I have not yet figured out how to get the TOC page to work). But CommentPress seems to be pretty much what I need for this project: byrondonjuan.com

    Best, Peter

    Plugin Author Christian Wach

    (@needle)

    Hi Peter, glad you’re making progress. I can see why you requested this feature!

    I wouldn’t spend any more time on the TOC page if I were you – it’s a relic of earlier times (prior to the introduction of page navigation menus in WordPress 2.7) when CommentPress used to try and auto-create a Table of Contents on a page. Nowadays, the menu is the TOC. (I should really remove that template, but am reluctant to do so in case any older CommentPress sites use it for something)

    I just release CommentPress 3.9.3 which should fix the formatting issues on your Dedication page – seeing it helped me discover that WordPress audio and video shortcodes didn’t play nicely with line-by-line commenting.

    Cheers, Christian

    Plugin Author Christian Wach

    (@needle)

    This is a very generous response. A new version and a child-theme template on GitHub with a simple CSS fix! Sounds perfect.

    If you’re happy with CommentPress and wish to show your appreciation, there are a number of ways you can do that on the plugin homepage!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove “0 Commens…” line?’ is closed to new replies.