get_comment_link without pagination base in the returned URL?

It’s strange that you want to use comments pagination where the comment links are without the comments pagination base. But you can try this (untested): /** * Remove the comments pagination base from comments links */ ! is_admin() && add_filter( ‘get_comment_link’, function( $link, $comment, $args ) { if( $args[‘per_page’] ) $link = sprintf( “%s#comment-%d”, get_permalink( … Read more

‘comment_post’ hook doesn’t seem to work? [closed]

Does anyone know why this ‘comment_post’ hook doesn’t seem to work!? … When a comment is posted, the function is not triggered… at all? The hook works. Try the following, it works: add_action( ‘comment_post’, ‘test_notify’ ); function test_notify($args , $args2) { echo ‘It works!’; die; } As does this: add_action( ‘comment_post’, ‘test_notify’ ); function test_notify($args … Read more

How to save comment name email url fields?

This is most likely side effect of your caching plugin. WP stores this information in user’s cookies and tries to read them to fill in the form. However since it happens on server side it needs to output info into a page’s source. So if page is being served from cache it just doesn’t work. … Read more

Custom comment link

You could try to add your own custom get_comment_link filter just before you call the wp_list_comments() function: // Modify comment links add_filter( ‘get_comment_link’, ‘wpse_comment_link’, 10, 4 ); // Display comments wp_list_comments( $args, $comments); where our callback is defined as: function wpse_comment_link( $link, $comment, $args, $cpage ) { // Only run it once remove_filter( current_filter(), __FUNCTION__ … Read more

Custom comment field not showing when logged-in

I’m not sure I fully understand your question, but to add some HTML (just over or under the submit field) that is visible to both logged-in and logged-out users, you can try the following: add_filter( ‘comment_form_submit_field’, function( $submit_field ) { //———————————– // Adjust the prepend to your needs //———————————– $prepend = ‘<p> Prepend some HTML … Read more