Does anybody know ?
I want not to modify the core (like comments.php), isn’t any other way to do that ?
Thanks,
SnomeaD
Ok, I’ve manage to hide the “Leave a Reply” section with some jQuery. Not the best I’ve done … but it’s working 😀
function myplugin_hideCommentForm($id){
if(!myplugin_allowDisplay($id)){
echo "<script type='text/javascript' charset='utf-8'>
jQuery(document).ready(function(){
jQuery('#respond').css('display','none');
jQuery('#commentform').css('display','none');
jQuery('.nocomments').css('display','block');
});
</script>";
}
}
add_action('comment_form','smsprotect_hideCommentForm');
After I press a post category, the posts for all that category, are displayed but the “Leave a Reply” section does not display until I press on the post “title” link. Is it possible to have the “Leave a Reply” comments section display when the post is originally displayed?
Paul
mabnbpdb@aol.com
(@snomead)
17 years, 11 months ago
Hi,
I’m trying to make a plug in to protect posts with a password (but without wp-pass) and I can correctly hide the comments (with add_filter(‘comments_array’,’my-function’)) but I can’t found any filter or action to hide the form.
Thanks
SnomeaD