Affiliate Disclosure: We may be compensated if you use our links to make a purchase. We are extremely selective in who we partner with & only recommend products we believe in. Our affiliate relationships do not influence our recommendations.

Focus Mode comment title custom text example
LearnDash Focus Mode comment title

If you’ve enabled comments in Focus Mode, the default title that appears before the comment box reads, “Leave a Comment.” This works fine for traditional blogs but it doesn’t always make sense for a LearnDash lesson or topic.

This article will show you how to use custom text instead of “Leave a Comment.”


In order to change this text, we’re going to use a piece of PHP code.

My preferred way to make changes like this is with the Code Snippets plugin. You could also add this code to the functions.php file of your child theme (if you’re using one), but I find Code Snippets to be easier to manage and less likely to bring your site down if you make a mistake.

  1. Install & activate “Code Snippets” from your WordPress plugins page
  2. Navigate to Snippets > Add New in the left sidebar
  3. Give your snippet a name. Something like “LearnDash – Focus Mode Comment Title Text”
  4. Paste the code snippet into the Code area
  5. Choose the Only run on site front-end option
  6. Click the Save Changes and Activate button

The Code Snippet

Here’s the code snippet that you’ll use:

Recommended Product

Uncanny Owl logo
Uncanny Owl has been making the best LearnDash plugins since the day LearnDash was born. Their LearnDash Toolkit is used on over 30,000 sites and adds 20+ features specifically for LearnDash. They also sell the popular plugins:
Uncanny Groups - group/corporate sales, group reporting & more.
Tin Canny Reporting - one of the best reporting plugins for LearnDash
Uncanny Automator - automate LearnDash & connect with 150+ WordPress plugins & third-party services

add_filter(
	'learndash_focus_mode_comment_form_args',
	function() {
		$comment_arguments = array(
			'title_reply' => 'Ask your questions here',
		);
		
		return $comment_arguments;
	}
);

The only thing you should change in the code above is the Ask your questions here text. Update that to whatever you want your new title to be.


For more tips, check out our comprehensive guide to LearnDash Focus Mode.