Jump to content
Sign in to follow this  
woutercreatovnl

Comments stuff in category view on posts with comments disabled

Recommended Posts

woutercreatovnl

(this is posted by Peter van Westen, colleague of Wouter) In the category view, I see the number of comments and the 'Leave A Response' link on posts that have 'Allow comments' turned off. I see that in the _post_footer.php there is no check for the comment_status ('Allow comments'). So to make the number of comments hidden, I changed lines 19-22 from:

			<div class="left">
					<span><?php comments_number(0, 1, '%'); ?></span>
					#comments" title="<?php _e('View Comments', TDOMAIN);?>"><?php _e('Comments',TDOMAIN)?>
				</div>[/code]

	To:
	
[code] <?php if( 'open' == $post->comment_status ):?> <div class="left"> <span><?php comments_number(0, 1, '%'); ?></span> #comments" title="<?php _e('View Comments', TDOMAIN);?>"><?php _e('Comments',TDOMAIN)?> </div> <?php endif;?>
On line 29 there is
e_pagelines('post_footer_text', __('View Full Post ?»',TDOMAIN));
This does get called on, but always returns 'Leave A Response'. So the second value (alt) in the e_pagelines function doesn't overrule the default text 'Leave A Response'. I changed that line to simply
echo __('View Full Post ?»');

This works, but I am sure that is not how it should be. So there probably needs to be a change in the e_pagelines function (class.options.php).

Share this post


Link to post
Share on other sites
cmunns

Thanks Peter, many of the old function and comments are actually deprecated anyway, we are in the process of getting them up to date.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×