ThemeShaper Forums » Thematic

[closed]

Remove "Comments Closed" text

(4 posts)
  • Started 3 years ago by iCristiano
  • Latest reply from iCristiano
  • This topic is resolved
  1. iCristiano
    Member

    Hi friends,
    I´m trying to find where I can remove the "Comments Closed" text on the posts/pages the comments are off, but I can´t.

    I found the thematic_postfooter_postcomments() function on content-extensions.php but it seems like its not this function that prints it...

    Any help???
    Thanks!

    Posted 3 years ago #
  2. Hey,

    Looking in content-extensions.php I see this

    // Create comments link and edit link
    if (function_exists('childtheme_override_postfooter_postcomments'))  {
    	function thematic_postfooter_postcomments() {
    		return childtheme_override_postfooter_postcomments();
    	}
    } else {
    	function thematic_postfooter_postcomments() {
    	    if (comments_open()) {
    	        $postcommentnumber = get_comments_number();
    	        if ($postcommentnumber > '1') {
    	            $postcomments = ' <span class="comments-link"><a href="' . apply_filters('the_permalink', get_permalink()) . '#comments" title="' . __('Comment on ', 'thematic') . the_title_attribute('echo=0') . '">';
    	            $postcomments .= get_comments_number() . __(' Comments', 'thematic') . '</a></span>';
    	        } elseif ($postcommentnumber == '1') {
    	            $postcomments = ' <span class="comments-link"><a href="' . apply_filters('the_permalink', get_permalink()) . '#comments" title="' . __('Comment on ', 'thematic') . the_title_attribute('echo=0') . '">';
    	            $postcomments .= get_comments_number() . __(' Comment', 'thematic') . '</a></span>';
    	        } elseif ($postcommentnumber == '0') {
    	            $postcomments = ' <span class="comments-link"><a href="' . apply_filters('the_permalink', get_permalink()) . '#comments" title="' . __('Comment on ', 'thematic') . the_title_attribute('echo=0') . '">';
    	            $postcomments .= __('Leave a comment', 'thematic') . '</a></span>';
    	        }
    	    } else {
    	        $postcomments = ' <span class="comments-link comments-closed-link">' . __('Comments closed', 'thematic') .'</span>';
    	    }
    	    // Display edit link
    	    if (current_user_can('edit_posts')) {
    	        $postcomments .= ' <span class="meta-sep meta-sep-edit">|</span> ' . thematic_postfooter_posteditlink();
    	    }
    	    return apply_filters('thematic_postfooter_postcomments',$postcomments); 
    
    	}
    } // end postfooter_postcomments

    So I imagine you can either override it or hide it with CSS using it's class

    Posted 3 years ago #
  3. iCristiano
    Member

    Yes @joperron, that was I thought... but, I don´t know why, it doesn´t work.

    Using firebug, I realize that on page the resulted code is <h2>Comments Closed</h2> and not the <span class="comments-link comments-closed-link">Comments Closed</span> like it suppose to be if it was a result of this function...

    Something strange is happening!

    Posted 3 years ago #
  4. iCristiano
    Member

    Sorry @joperron and friends, I found it. The problem was in a plugin. Resolved!

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.