Display last comments on home page

A slightly more complete and less abrupt answer. <?php $args = array( ‘status’ => ‘approve’, ‘number’ => ‘5’ ); $comments = get_comments($args); foreach($comments as $comment) : // display any of the following indexes as you’d like var_dump($comment); endforeach; ?>

create separate page template for wordpress comments

That appears to be simply a Page template that outputs the “Recent Comments” Widget for comments and pings, and then (probably) another Widget that displays a list of most-commented Posts. If those indeed are Widgets, then you simply need to create a custom Page template, and instead of outputting a Loop, output a the_widget() call … Read more

It doesn’t matter if I have more than one comment. get_comments_number still equal to one?

I think the problem is here >] <h3 id=”comments-title”><?php printf( _n( ‘One Response to %2$s’, ‘%1$s Responses to %2$s’, get_comments_number() ), number_format_i18n( get_comments_number() ), ‘<em>’ . get_the_title() . ‘</em>’ ); ?></h3> Try changing that to <h3 id=”comments-title”><?php printf( _n( ‘One Response to %2$s’, ‘%1$s Responses to %2$s’, number_format_i18n( get_comments_number() ), ‘<em>’ . get_the_title() . ‘</em>’ … Read more

Allow tags between shortcode in comments

You want to allow folks to post code in their comments, like on here were we can just do <p>something</p> without having to worry about doing any &gt; or &lt; stuff? I think you’ll still want those special html characters converted to their respective entities, but you need to stay under the radar to avoid … Read more

Avoiding calls to theme-compat

I’m not sure why you would want to remove the aria-required attribute. It is a form attribute in draft at W3 that deals with accessibility for working with applications and handicapped users. Anyway, you can remove it by filtering the comment_form_default_fields and comment_form_field_comment. The example below can be used as a plugin or in your … Read more

Comments and pingbacks issues

Actually, after trying a lot more I figured out that it was actually something quite simple I just forgot. Apart from the code in the comment.php, you also have to change this in your single.php: <?php comments_template(); ?> to <?php comments_template(”, true); ?> And that did the trick! I leave this here for future reference … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)