Support » Theme: Twenty Twenty » hide the text “no comments”

  • Resolved xoldie

    (@xoldie)


    can anyone tell me how to hide or edit to remove the text “no comments” please let me know thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • simple, hide the text in all cases, commments or no comments:

    .post-meta .post-comment-link { display: none; }

    (via ‘Additional CSS’)

    or more involved, remove the numner unless there are already comments;
    add some coding into the child theme’s function.php:

    add_filter(
    		'twentytwenty_post_meta_location_single_top',
    		function() { 
    		if( get_comments_number() ) { 
    			return array(
    				'author',
    				'post-date',
    				'comments',
    				'sticky',
    			);
    		} else {
    			return array(
    				'author',
    				'post-date',
    				'sticky',
    			);
    		}}
    	);
    
    Thread Starter xoldie

    (@xoldie)

    OK maybe I am not clear on this.. I only want to hide “No comments” text when i do get new comments I still want to show 1 comments , 2 comments.. just look ugly to have all post showing “NO COMMENTS!” if this make sense…
    nevermind i didn’t try add the code to the functions.php and it work.. sorry and thank you!!

    • This reply was modified 1 year, 5 months ago by xoldie. Reason: nevermind i didn't try add the code to the functions.php and it work.. sorry and thank you!!
    • This reply was modified 1 year, 5 months ago by xoldie.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘hide the text “no comments”’ is closed to new replies.