How to Remove Comment Meta

Hi, I am designing a template for Single Blog Post, and including the default comments section using bricks. Everything works fine but I want to delete X days ago from the published comment.
Check the below picture, I want to remove box 1.
Bricks Comments with Comments Meta
Want to look like the below picture,
Bricks Comments without Comments Meta

I know I can do it via CSS but it won’t delete actual code from my sites, it’s still shown to spider.
If I go to bricks > includes > utilities > comments.php and delete line 57 containing,

<?php echo '<a href="' . get_comment_link() . '"><span>' . human_time_diff( get_comment_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . esc_html__( 'ago', 'bricks' ) . '</span></a>'; ?>

then highlighted box 1 removed but it’s not a permanent solution because after every brick update it will be overridden with previous values.

Related Facebook Post

What if you copied that file down to the Bricks child theme and deleted it?

Then bricks could update with no issues to the child?

I already tried it, it’s not working.

Any one able to figure it out, i am asking about it because Google pull dates from comment meta despite using updated date in the post. It’s caused seo problem, that’s why I am ask here.

Hi masoodalam51,
You can use the default WordPress comments template inside of a code element.

<?php
  comments_template();
?>

Best regards,
timmse

1 Like

After using the above code, and with the date removal code, function theme_prefix_remove_comment_date($date, $d, $comment) { if ( !is_admin() ) { return; } else { return $date; } } add_filter( 'get_comment_date', 'theme_prefix_remove_comment_date', 10, 3); // Remove comment time function theme_prefix_remove_comment_time($date, $d, $comment) { if ( !is_admin() ) { return; } else { return $date; } } add_filter( 'get_comment_time', 'theme_prefix_remove_comment_time', 10, 3);, It’s looks like this,
comment-date-not-removed

In generatepress I just add add_filter( 'generate_show_comment_entry_meta', '__return_false' ); and that line is completely gone. I want to know if a similar type of filter is already present in bricks or not.

If you install the plugin “symply show hooks” you can see all hooks on the page and what ist hooked where. I think with this information one can write a filter like @masoodalam51 mentioned it for generatepress.

1 Like

@masoodalam51 With Bricks you have the opportunity to create your unique way to output the posts, using the repeater element!

1 Like

@DavidKnecht I will. Currently busy in migration of my blog from WordPress to Hugo.

If I modify comments.php of bricks > includes > utilities > comments.php, how to load it instead of actual theme file. Because I copied it as exact folder structure in child theme but it not working.

Hi, did you find solutions yet? I try to copy includes/utilities/comments.php to child theme too and modify it, but it’s not working too.