How to make comments private for commentor and post author

You can use the pre_get_comments filter to modify the parameters of the comment query before it fetches the comments. Specifically the author_in parameter. I tried to write an example, though I haven’t tested it, but it would be similar to this: add_action( ‘pre_get_comments’, ‘author_and_self_comment_filter’ ); function author_and_self_filter( \WP_Comment_Query $query ) : void { // We … Read more

Embedding Youtube video on comments

Just add the comments to oEmbed. Here’s a small plugin that you can use as MU-Plugin or normal plugin and that should explain what’s going on pretty well. <?php defined( ‘ABSPATH’ ) or exit; /* Plugin Name: (#105942) oEmbed Comments */ add_filter( ‘comment_text’, ‘wpse_105942_oembed_comments’, 0 ); function wpse_105942_oembed_comments( $comment ) { add_filter( ’embed_oembed_discover’, ‘__return_false’, 999 … Read more

Custom setup of wordpress comments that are displayed

Try adding the following code to your comments.php template file (where you want the “next page”https://wordpress.stackexchange.com/”prev page” links displayed): <?php paginate_comments_links(); ?> This should enable multiple pages for your comments. Also, check out this Codex page (paginate_comments_links) for more information. Hope this helps 😉

comments_number not displaying

You need to change the code you’re using from <div class=”post-meta”> <p><?php the_date(); ?> | <?php the_tags(‘tags:’, ‘, ‘, ‘<br />’); ?> | <?php comments_number( $zero, $one, $more ); ?> comments</p> <?php comments_template(); ?> </div><!– end post-meta –> to <div class=”post-meta”> <p><?php the_date(); ?> | <?php the_tags(‘tags:’, ‘, ‘, ‘<br />’); ?> | <?php comments_number( … Read more

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