This PHP code enables you to add a small comment form within the content area of a post or page.
You could also use the shortcode this code generates in a text widget if your themes supports shortcodes in widgets.
This code only prints the comment form. If you want to print the entire comment template use the comments_template();
function.
Here’s an example of what the form looks like within 2 paragraphs of text.
Here’s some extra code which removes both the comment notes before and after the comment form.
You could reduce the size of the comment content area and remove or re-position some of the comment form fields like this:
.entry-content .comment-form-author,
.entry-content .comment-form-email,
.entry-content .comment-form-url {
display: inline-block;
width: 32.9%;
}
.entry-content .comment-respond,
.entry-content .entry-pings {
padding: 0;
}
.entry-content .comment-respond input[type="email"],
.entry-content .comment-respond input[type="text"],
.entry-content .comment-respond input[type="url"] {
width: 98%
}
Leave a Reply
You must be logged in to post a comment.