How can i remove comment date in pagespeed theme?


#1

how can i remove comment date in pagespeed theme?
Thanks!


#2

I want to remove
1 date of comment

2 email field:

3 url fiied

so that users only need to enter a name to make a comment, and there will be no date on it


#3

See if this helps for hiding email and website url

https://wordpress.org/support/topic/hide-email-and-website-fields-for-comments/


#4

i just tried it works great on swifttheme , but it didnt’ work on pagespeed.

for pagespeed theme, I also want to remove date of comment on the page , and move the comment box to the top , just below an ariticle.

I know how to do it on swifttheme.


#5

Bbout email field & url field , what you shared above works on swifttheme.
I removed comment date &time on pagespeed theme by adding this:

// Remove comment date
function wpb_remove_comment_date($date, $d, $comment){
    if (!is_admin()) {
        return ;
    } else {
        return $date ;
    }
}

add_filter('get_comment_date', 'wpb_remove_comment_date', 10, 3);

// Remove comment time

function wpb_remove_comment_time($date, $d, $comment){
    if (!is_admin()) {
        return ;
    } else {
        return $date ;
    }
}

add_filter('get_comment_time', 'wpb_remove_comment_time', 10, 3);

#6

i removed those fields in pagespeed

by adding these to aditional css:

.comment-form-author input, .comment-form-email input, .comment-form-url input {
width: 100%;
border: solid 1px #dee0e3;
border-radius: 2px;
display: none;
}

And i remove those fieids on swifttheme, thru the plugin above.

Not sure which is best way.

to move the location of comment box:
is there something similar to this with pagespeed theme:
add_action( ‘genesis_before_comments’ , ‘wps_post_type_check’ );
function wps_post_type_check () {
if ( is_single() ) {
if ( have_comments() ) {
remove_action( ‘genesis_comment_form’, ‘genesis_do_comment_form’ );
add_action( ‘genesis_list_comments’, ‘genesis_do_comment_form’ , 5 );
}
}
}


#7

For moving the comment form to the top, you can move these three lines in page-speed/comments.php

$args               = array();
$args['class_form'] = 'comment-form cf';
comment_form( $args );

to the top, before

// You can start editing here -- including this comment!

Ideally use the child theme to do this.


closed #8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.