Remove the URL author of post on all comments

WordPress have “get_comment_author_url” function to retrieve the url of the author of the current comment. you can set it to blank using this function remove_author_url( $url, $id, $commentr ) { return “”; } add_filter( ‘get_comment_author_url’, ‘remove_author_url’, 10, 3);

Comment restrictions Wodpress

The comments_open() boolean function return is filtered by ‘comments_open’. Untested, pseudo code as a guide: add_filter( ‘comments_open’, function( $open ) { $user = wp_get_current_user(); $open = $open && $user && time() – mysql2date( ‘U’, $user->user_registered ) > 3 * DAY_IN_SECONDS; return $open; } ); No guest users will be able to comment either, and I … Read more

Disallow Comments

Go to Settings – Discussion from the left sidebar of your WordPress admin panel. On this page, uncheck the option that says “Allow people to post comments on new articles” and then click on the Save Changes.

Fetch commens from a specific post

This will allow you pull the comments of a post via the id and then edit the returned content info of the post. You will be required to add your CSS and html to style the comments. $args = array( ‘author_email’ => ”, ‘author__in’ => ”, ‘author__not_in’ => ”, ‘include_unapproved’ => ”, ‘fields’ => ”, … Read more

Display latest comments (global) with replies on a page

Try with array method, using reply post type with its parent. <?php $args = array( ‘post_type’ => ‘reply’, ‘status’ => ‘approve’, ‘post_parent’ => $postID, ‘posts_per_page’ => 50, ‘orderby’ => ‘date’, ‘order’ => ‘ASC’, ‘hierarchical’ => true, ‘ignore_sticky_posts’ => true, ); foreach(get_comments($args) as $comment) :?>

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