Comment Layout
-
Hi there,
Is there a specific part you are referring to?
Please be mindful that we cannot provide a full custom solution in the forum here but I’ll try to point you in the right direction.
Ok sir no problem !! , Can you please provide me the code of how can i change the alignment? It means how to add comment policy below the title and and alignment of placeholder box like given here – https://kinsta.com/blog/rank-math-vs-yoast
Hi there,
You can add a comment policy by using the
generate_below_comments_titlehook.Example:
add_action('generate_below_comments_title',function(){ echo '<p class="comment-policy"><strong>Comment policy:</strong> We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.</div>'; });As for the specific styling of the box(shadow, padding, etc):
Try this:
div#respond { display: block; padding: 40px; background: #fff; background-size: cover; background-repeat: no-repeat; background-position: 50%; box-shadow: 0 10px 40px 0 rgb(47 47 47 / 10%); position: relative; transition: all .2s linear; }The alignment is WordPress default.(text-align:left;)
Thanks @ejcabquina but i want to move the comment policy text below leave a reply
There’s no hook within the comment box directly below the leave a reply, unfortunately.
But you can try filtering the default WordPress comment template by doing this:
function wpdocs_comment_form_defaults( $defaults ) { $defaults['title_reply_after'] = '</h3><p class="comment-policy"><strong>Comment policy:</strong> We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.</p>'; return $defaults; } add_filter( 'comment_form_defaults', 'wpdocs_comment_form_defaults' );Thanks @ejcabquina it’s worked, one last help can we add a button after “Leave a reply” like this https://prnt.sc/ya6ba9 . Such that users can easily navigate through it. Please Sir Last help
That one would be more difficult unfortunately – you will need to modify the default WordPress comment template itself.
Ok thanks for your free help, now it’s time to close the support forum !!
The topic ‘Comment Layout’ is closed to new replies.

(@parkinternet)
5 years, 3 months ago
Dear Sir/ Mam, I want to change my generate press comment layout exactly like this – https://kinsta.com/blog/rank-math-vs-yoast . How can i change it? I want same as the reference url.
The page I need help with: [log in to see the link]