Home / functions.php / Remove admin name
  • How to Remove admin name

    no thumbnail sorry: Remove admin name

    Adding this PHP code to the functions.php file of your wordpress theme will remove the admin name from the comments class.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    function remove_comment_author_class( $classes ) {
    	foreach( $classes as $key => $class ) {
    		if(strstr($class, "comment-author-")) {
    			unset( $classes[$key] );
    		}
    	}
    	return $classes;
    }
    add_filter( 'comment_class' , 'remove_comment_author_class' );
    

    ( WordPress codex functions, hooks, in this snippet. )

    comment_author, comment_class, add_filter,