If the person commenting is already logged in you could capture the user object like so $user = wp_get_current_user(); and then simply grab the username like $user->user_login. Once you have this it shouldn’t be too hard to add in to the creation of a comment so its only asking for the username alone and only once logged in.
Related Posts:
- Displaying Logged-In User Name in WordPress Menu
- Change comments form title on a page by page basis
- How do I create comment-reply-button using element not
- Replace comment avatars and links at the same time
- Adding ads code between comments
- How do I fetch all comments per post via WP REST API?
- comments_number display outside specified span
- Ajax load more button for comments wordpress
- Limit 1 global comment per minute
- Create Page To Count Comments For Each Post In WordPress Site
- wp-comments-post.php file returns a blank page
- Alter required message using comment form api
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- Fetching Initials of the Commentator in the WordPress Website
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- Show all people who commented on all posts by an author
- Display a custom name when the user has no name settle in his account
- How to auto-generate random numbers in username?
- How to get the rating value of each comment
- Trouble figuring out how to get my button to submit comment
- How do I change/modify the_post_thumbnail(); html output?
- How to preserve PHP modifications while upgrading WordPress?
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- Shortcode created to check language not works
- Best way of adding CSS which can be manipulated by the user via theme option panels?
- How to Append to the_excerpt() Function
- Listing all sub-pages?
- How to check if comments are paginated?
- Why do filters/actions require an argument count?
- How can I default to all WordPress roles when parameter is not included in shortcode?
- Recent post display using shortcode
- How to speed up a wordpress function with multiple loops?
- syntax issue on php 7.4
- How can I use wp_insert_comment to write a comment when a post is edited?
- How to remove the excerpt in the Dzonia Lite theme
- How do you add customer capability after Woocommerce purchase?
- Add a class to the anchor tag on HTML5 gallery
- Conditional Header in wordpress
- Menu — How to add “current-menu-grand-ancestor” css class
- functions.php is being included twice, creating PHP fatal errors
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- How to put a variable in a instance in the widget
- get a simple array of all of the term names that exist in all taxonomies
- Logged in user ID as post ID
- Show categories then when clicked on a category list all sub category and when clicked show all posts in that sub category
- How to store data from multiple forms using ajax and php
- How to control WordPress image metadata (using Imagick)?
- Display a specific category of products in shop page and disable code for specific actions
- Removing “wpautop” (auto tags) only on certain pages?
- theme_root returning a truncated URI
- Call to undefined method – Download Monitor
- Use .php file as page instead of wordpress page & template file?
- Find hours between post_date and post_date_gmt
- Run a code only on theme activation only during first activation
- Shortcode from a function not working
- Is it possible to return content, and then also continue to do other things?
- Creating WordPress Shortcode with Variable
- How to add text to the start of all comments?
- Convert the_permalink() function output into string
- Add meta tags to a custom header
- get_current_site() is undefined
- How to use mysql LIKE with wpdb?
- Function sanitize_title() does not appear to be working
- writing an unique php function to be used on my website
- Displaying Event within two given time frames
- How to prevent a function from running based on host (ie web vs local)?
- How to call custom function outside from the admin page?
- Output product category link from WP_Query
- Adding onload to body for certain pages
- Delete images from media library when user deletes an image from ACF Gallery
- Reject all malicious URL requests functions.php
- Change wordpress’ database data using ajax – how to get current user id?
- Add custom field on admin dashboard comments / reviews
- Display the list of user’s comments + the post title + date
- Best way to use variables in multiple functions?
- Notice: Undefined variable
- How to override WooCommerce Order Item Meta with data from Cart?
- Taxonomy Child Term, Counter is staying on 0
- Access to “My Site” is missing from the admin bar
- Offset with ajax load more posts duplicates
- Need help with PHP functions
- Using get_theme_mod with checkbox to display content
- WordPress styling recent post
- Styling admin page rows in order of importance (checkboxes)
- Break a WordPress function to run in patches and re-continue
- Pagenav Not appearing on custom Template
- syntax error unexpected ‘}’ at 364 line
- get_post_meta no longer working
- Highlight posts currently being edited on multiple editor site?
- Assign new post author IF another user in custom field on post transition
- Create and publish a new post every Monday, listing the post titles and links to the posts published during the previous week
- How do I change the Go To Categories link in the term_updated_messages
- WooCommerce – Show ‘Sales’ badge on variable products where only some variations have sales price [closed]
- Understanding responsive imagery
- How to get meta box labels?
- Background Tasks in a WP Cronjob?
- Tags being Inserted in html from plugin PHP not passing through the_content
- Add/Modify rel=canonical of all the pages of a wordpress website
- Calling a PHP function from a menu item
- Function extension