Deep down the function uses get_comment_author_link()
to output the author name. That function is filterable. Inside the function it checks if the author has a URL and wraps the name in a link to it if it exists. We can use the get_comment_author_link
filter to just output the name, and ignore the URL. This is pretty simple, since the callback for this filter gets the author name as one of its arguments, so we just need to pass it through untouched:
function wpse_284352_author_link( $author_link, $author ) {
return $author;
}
add_filter( 'get_comment_author_link', 'wpse_284352_author_link', 10, 2 );
EDIT: It’s actually even simpler, the URL has its own filter, which means that can be filtered with one of WordPress’ built in functions in one line:
add_filter( 'get_comment_author_url', '__return_empty_string' );
Related Posts:
- Nested comments ignored for max per page in wordpress
- Custom Comments – Parent / Nested Reply
- Why is styling comments so complex?
- Comment form not display properly?
- How to Auto Approve Comments on a Specific Page?
- comment_form() generates the wrong action url
- Customize comment list markup
- how to pull wordpress post comments to a external page
- Separated Comment from Post
- How to call wp_list_comments() with callback outside the loop
- How to get comment meta values by post ID
- Compact pingback list with favicons
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- How to remove comment link title attribute?
- Comment entry screen shows even though “Allow Comments” is unchecked
- Jetpack Comments with fall-back
- WP_Comment_Query – Get comments and answers separately
- Trackbacks not displaying
- Nested comments in WordPress theme
- Comment status shows ‘closed’ in db, but it shows ‘open’ when i echo it
- Difference between “comment_form_default_fields” AND “comment_form_fields”
- How to enable Disqus comments in a WordPress theme I’m creating from scratch? [closed]
- How to add custom class to get_avatar()
- Same comments on all posts
- WordPress Comment spam issue
- WordPress comments title
- Ajax Comment Upvotes – Votes don’t always register
- Modify comments_popup_link output
- Woocommerce Theme Reviews / Comments
- child comments not displaying as nested
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- wp_update_comment not working
- Recent posts with comment count in “Sidebar” template [closed]
- Is there a Function so that the author of the comment can delete his own comment?
- Software for WordPress Theme and Plugin Development? [closed]
- Should we use get_template_part() in functions files instead of include_once?
- Reset positions of metaboxes in admin
- Add a dropdown to theme customizer
- design and development workflow
- How to control initial wp_head() output?
- enqueue script for specific shortcode
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- How can I insert default widgets when my theme is activated (similar to what twenty eleven does)?
- Why might $input (Settings API) be coming through empty?
- add generated stylesheet from parent theme after child-themes style.css
- Creating Page Based on Category
- How to check if post has any tag?
- Merging PHP download script into `functions.php`
- Should use widgets in this case?
- Changing the entire control choices using wp.customize with JavaScript
- Get last modified date for menu link
- A theme that follows all the best practices to learn from?
- Root Sage theme styles are not working!
- How to configure wordpress to work with Vuejs with SSR and without hashbang
- Cannot update WordPress General Settings Site Title and Tagline
- How can one update a theme on a live site without interruption?
- How can I disable/hide certain themes in multisite?
- Some doubts about how to show posts in a custom theme?
- Why are theme templates organized as multiple point of entry PHP files instead of reusing your theme’s index.php?
- Single Page theme [closed]
- How to create a custom template to admin dashboard
- Easy lightbox effect inside of dashboard widget
- Add, edit specific CPT with custom role
- how to display search term in the template full site editor
- Custom Field created in add_meta_boxes reappearing itself again in the default Custom Metabox
- Dynamically generated wordpress customizer options?
- Filter categories used with Custom Structure Permalink
- Code to determine WP version check
- How to escape html generate by a loop
- get_term_link is Ending to single.php
- making my theme multisite compatible?
- Moving post title down the page / Removing a block from a post
- I want to change background image of my wordpress site on particular post type
- how to retrieve the image title for image Post Format
- Hestia Child theme creation
- get_comments_number() returns 0
- Want to add cart and a search bar in the right of logo line
- Twenty Twelve Author not displaying
- Default PHP document / names needed for a WordPress theme?
- How can I sort my loop based on meta data, using a form?
- What is the_permalink() on a category page?
- How to modify theme content in Thematic?
- WordPress theme options checkbox default checked state
- Custom themes that won’t work when theme is changed
- only the first post is shown
- wordpress can’t find single-project page
- WordPress Theme: What is the right way to put inline CSS loading from a CSS file
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- How do I build a WordPress Profile/Author Header?
- Create settings field on button click
- Undefined index: custom_sidebars
- Single Featured Image Repeating
- How to remove menu from WP-Admin menu
- apply_filters to featured image
- How do I move menu to the bottom in Custom Community theme?
- How do I get information about a page, such as featured image, except, and title?
- My wordpress site memory exhausted more than 1GB trying to debug with default
- Display first post on each page differently than the others
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- Image and font support missing in editor when deploying theme remotely