PHP code glitching on comments_open()
-
I’m trying to add a tiny suffix to article titles, which would show the visitors how many comments a given article has. But, if the the comment section is closed, it gives me a big and nasty ‘comments closed’ remark. I don’t want that.
So I’ve tried my hand at PHP to disable this ‘comments closed’ remark. Here’s my code:
<?php if ( comments_open() ) { comments_popup_link( '0', '1', '%' ); } else { } ?>
Except: it doesn’t work. It just refuses to load half the page if I enter this code. I’m really not sure how this php code is faulty, so I would be grateful if someone could point out to me what I did wrong.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP code glitching on comments_open()’ is closed to new replies.