Code is not tested. But theoretically it should work:
add_filter('comment_form_defaults', 'wpse337366_comment_form_modification');
function wpse337366_comment_form_modification($defaults)
{
// put your condition here
if( is_page('my-page') || is_singular('my_post_type') )
{
$defaults['title_reply'] = __('Leave a Review');
}
return $defaults;
}
You can place the code in a plugin or your theme’s functions.php
.
The code will filter the default texts passed to the comment_form()
.
Reference
Related Posts:
- Is it possible to pull comments from facebook into your blog?
- Enable Submit Comment Without Page Reload (Using Ajax)?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- How to use a custom comments template
- Comment visibility
- Get comments for more than one post
- Add placeholder attribute to comment form fields
- Allowing more elements in comments via functions.php
- Set post comments open function
- “Categories” for comments?
- Allow anonymous comments, but prevent spam [closed]
- Where to remove from comment’s feed?
- Allow guests comments on single post
- Delete all user comments
- Why do I get email notifications about comments that WordPress has already determined are spam?
- Delayed commenting
- “Leave a comment” link even when you can’t
- An action hook where a comment meta is updated
- adding more fields to the comments form including image upload
- How to Delete Old Comments by Date?
- Display comment meta data after quick update
- How to hide “Comments are disabled”
- WP comments form (custom) is displaying an extra comment field
- WordPress comments just vanished even tho there are about 250+ of them. Where did they go?
- WordPress Comment. Need some details of wp_comments DB table
- Sanitizing comments or escaping comment_text()
- Restore trashed posts with comments
- How to import only certain comments from post[s]
- How to remove ‘Site’ in the comment form?
- Make wordpress comments work with include templatepath
- Removing from Comment
- How do you turn on comments for only the last page of a paginated post?
- How to not load comments form on post preview?
- Sort/list/arrange comments by comment author in un-nested/no thread comments
- Archive comment w/o moving to spam/trash
- Get the top level comment ID
- Custom WP Comments Query with Nested Comments Possible? (Hierarchy/Depth)
- Log file reports SQL Error processing child comments
- Editing WordPress comments : generating comment from selection
- How can I assign a specific id to the last comment of a post
- Modify WordPress Comment From For AMP Html
- Get Post ID within wp_set_comment_status hook
- How to implement comments on specific fields in wordpress?
- delete duplicate comments
- code highiglight not working comment
- Comment number does not increment
- Cancel comment filter?
- get_comments not working consistantly with post_id
- Comments are invisible, what’s the problem with wp_list_comments?
- WP confusing “links to my articles” with “comments”?
- How to check if a comment has replies?
- Can I have Comments open to specific users only?
- How to edit the text below “Leave a Reply”
- Safe to remove this: when using a 3rd Party Comment App? [closed]
- Commenting system for WordPress
- How do I disable the discussion notification emails to us when a comment is “approved” and when an adiministrator replies?
- Review count per product
- Moving post’s content to post’s comments section
- How to create post comment from different domain
- get_comment_link without pagination base in the returned URL?
- Comments on future posts
- Display custom text when comments are closed
- Returning error upon comment being flagged as spam
- I need to disable Disqus comments pre-approval, but i can’t find where
- JetPack comment threads are displaying above comment box? [closed]
- Remove Javascript generated by Comments
- How to Trigger comment_form_after action if comment_form() not used
- Need Comment Link Help
- Page comes up blank using w3 total cache [closed]
- Comment Table Size Results in Slow Page Loads and 500 Errors
- Insert ads between comments
- get_query_var(‘paged’) for WP_Comment_Query always return 1 when using paginate_comments_links()
- Changing the Comment Fields using Filter (without success)
- How to show username in reply to comment?
- Comments pagination: reverse JUST the links texts (1-2-3 to 3-2-1), not comments order
- Custom sort comments with select form
- Subcriber getting multiiple notifications for new comments
- Limit Comment Line Count – Add Read More Button
- Commenter username copies author username
- Fire Social Annex Code on Comment Approval
- Displaying comment rating stars in carousel
- Enable comments option
- Change Comment Text [duplicate]
- Comments closed but enabled on edit screen
- Let user delete comment on front end only
- How to force users to nest their comments
- jQuery to Create Button to Show/Hide WordPress Comments and to Hide Comments by Default
- Insert comment and still use moderation
- Auto approve all comments (editor)
- add field comment [duplicate]
- Let users comment on categories in WordPress
- Loop not displaying comments_popup_link
- Display of comment_date within get_comments?
- How to batch convert comments to posts?
- Customize comment notification e-mails with HTML
- prevent duplicate comments using wp_insert_comment
- I need help about wordpress of members section
- comment_approved custom value
- TinyMCE in comment reply form showing toolbar but can’t edit reply
- Add pending for reply comment in console WordPress