Tagged: Allow Comments
When a user creates a new blog post, I wanted them to have the option to select Yes and No under the Allow Comments section. Here’s how I added that.
\wp-content\plugins\bp-simple-front-end-post\form.php
Line 108:
<label for="bp-simple-post-comment-status"> <input id="bp-simple-post-comment-status" name="bp_simple_post_comment_status" type="radio" value="open" <?php echo checked( 'closed', $current_status ); ?> /> <?php _e( 'Yes', 'bp-simple-front-end-post' ); ?> </label>
Changed to:
<label for="bp-simple-post-comment-status"> <input id="bp-simple-post-comment-status" name="bp_simple_post_comment_status" type="radio" value="open" <?php echo checked( 'closed', $current_status ); ?> /> <?php _e( 'Yes', 'bp-simple-front-end-post' ); ?> </label> <label> <input id="bp-simple-post-comment-status" name="bp_simple_post_comment_status" type="radio" value="closed" <?php echo checked( 'closed', $current_status ); ?> /> <?php _e( 'No', 'bp-simple-front-end-post' ); ?> </label>
Hi John,
Since checkbox represents Yes/no, we used it.Your implementation is correct too as you have moved from checkbox to radio. Thank you for sharing.
Regards
Brajesh
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
This topic is: resolved