Using Disqus with headless WordPress setup?
Using Disqus with headless WordPress setup?
Using Disqus with headless WordPress setup?
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);
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
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.
You can’t just do a simple If statement like this? … if ( count( $usercomment ) < 1 ) { comment_form(); }; I don’t know why you would have to unset it.
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
Remove nofollow from internal comment links via functions.php
Comments on my custom post type
Your code uses this: number_format((float)$results[$i][‘avg_rate’], 2, ‘.’, ”) And if we look at where $i is set, we see this just before the loop: $i=0; and this: $i++; But I don’t see how this maps in any way to the current post when there’s a conditional, meaning that not everything in the results array is … Read more
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) :?>