Not showing comment link when comments are disabled

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Not showing comment link when comments are disabled

Postby drlaporte » 22 May 2012, 22:37

In a post, I would like to not display the link to comment (or the label 'comments closed') if the article is not set to accept comments.
Thks.
drlaporte
 
Posts: 9
Joined: 20 May 2012, 21:40

Re: Not showing comment link when comments are disabled

Postby Colin » 22 May 2012, 23:47

Turn it off then :D

Suffusion Options > Back End > Comment Settings

Explore the Suffusion options it is surprising what you will find. ;)
Colin
 
Posts: 2785
Joined: 27 Oct 2009, 10:46

Re: Not showing comment link when comments are disabled

Postby drlaporte » 23 May 2012, 00:18

Hi Colin,
yes, useful menu indeed, I discovered a few interesting things there...
However, I still get the "Comments closed" label, even if I select to hide it in the Post (
Hide.JPG
option selection
Hide.JPG (32.62 KiB) Viewed 383 times
).
Thanks.
Pierre
drlaporte
 
Posts: 9
Joined: 20 May 2012, 21:40

Re: Not showing comment link when comments are disabled

Postby drake » 23 May 2012, 00:33

Without an url we really can't see what happen on your site - is the second options that works for everybody, but for you don't...

Have you disabled comments at Settings -> Discussion? Have you disabled comments for those particular posts/pages? Those particular posts/pages are regular post formats or some specific posts formats like "attachment", "video" and so on... because in last case there are another set of options for each post format at Suffusion Options -> Other Graphical Elements -> Post Formats.
drake
 
Posts: 3771
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Not showing comment link when comments are disabled

Postby drlaporte » 23 May 2012, 08:43

Hello,

I rechecked the issue, and found out that the link is only in the list of posts, and NOT in the post when I open it.

If you want to look at the site, goto "drlaporte.fr/WordPress3/"

You have an example under the tab "Calendrier" (this is a category, and the pane simply lists all posts with this category set). There are 2 simple posts, with only text inside.

The first one you have "Commentaires fermés" (Closed comments), because in the article I both de-activated the comments and the retrolinks.

The second one, you have "Pas de commentaires" (No comments), because in the article I only de-activated the comments.

If you open any of the two posts, you have no longer the link. But it is still in the category post list, and I have not found a setting to disable that.

Thanks.

Pierre
drlaporte
 
Posts: 9
Joined: 20 May 2012, 21:40

Re: Not showing comment link when comments are disabled

Postby drlaporte » 10 Jun 2012, 02:44

Solution : in custom/post_header.php, when non singular post, only display when $post->comment_status == 'open', like for singular posts.


if (is_singular()) {
if (is_attachment()) {
...
}

if ('open' == $post->comment_status && ($post_show_comment == 'show' || $post_show_comment == 'show-tleft') && !$comments_disabled) {
?>
<span class="comments"><span class="icon">&nbsp;</span><a href="#respond"><?php _e('Add comments', 'suffusion'); ?></a></span>
<?php

}
}
else if ($post_show_comment == 'show' || $post_show_comment == 'show-tleft') {
if ($post->comment_status == 'open') {
?>
<span class="comments"><span class="icon">&nbsp;</span><?php comments_popup_link(__('No Responses', 'suffusion') . ' &#187;', __('1 Response', 'suffusion') . ' &#187;', __('% Responses', 'suffusion') . ' &#187;'); ?></span>
<?php
}
}
drlaporte
 
Posts: 9
Joined: 20 May 2012, 21:40


Return to Support Requests

Who is online

Users browsing this forum: Google [Bot], sadeghsalari and 12 guests