Any comments_template filter should return an absolute filepath to the comments template – use comment_form_defaults and set the class_form argument:
add_filter( 'comment_form_defaults', function ( $args ) {
$args['class_form'] = 'my form classes';
return $args;
});
Related Posts:
- Load different template file when condition met?
- Am I using the right hook for removing quicktags on the admin TinyMCE?
- How Can I Have A URL Changed Based on the Originating URL?
- Problem getting single_template filter to work – I want to serve a different single.php file for posts in a certain category
- How to add attributes to tag when template cannot be directly modified
- How do I target a single page to modify the comment form of only that page?
- theme_page_templates not working
- How to modify core when there is no hook?
- I can not include page to wordpress function add_filter, the_content
- Change the template when the user is not logged in using page_template filter (it does not work)
- Use of comment_reply_link_args filter
- comment_for() Custom fields not visible when user is logged in
- Shortcode / plugin with custom (flexible) output
- output custom Posts on a Page
- How to redirect template_directory to subdomain relativ url?
- Would like to use hook or filters to customize email templates
- How can I filter same content in page
- the_content filter not working when Jetpack activated. Any idea?
- Show child theme for users on specific IP
- if i put the code in my theme’s function.php file can it work?
- How could I create real-time filtering in this case?
- How to add placeholder into comment form textarea?
- Add custom options to the wplink dialog
- Sanitize and data validation with apply_filters() function
- How many filter/action hooks are healthy?
- Filter specific shortcode output?
- Insert new element to array with add_filter
- How to hook into unregistering a widget instance?
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- get_option() filtering and getting out of recursion
- Get excerpt from $post->post_content
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- How can I filter Microsoft Word gunk from pasted content?
- How to disable all WordPress emails modularly and programatically?
- Allow Profile HTML for select users
- Alter only the page title, not the post titles within
- WordPress 3.5+ upload tool filter
- Search with filters and title
- Use content custom filter for all shortcodes
- Filter all html output
- How to specify which category of the post to use in case of multiple categories
- Return array of images after content
- failed to filter hook `get_terms_defaults`
- Filter list by a unique meta value dilemma
- How to use shortcode attribute in separate function
- Is it possible to track down Actions and Filters?
- How can filters be run when they are never applied?
- How to filter a wordpress core function?
- Adding id and class to the search input in WordPress search form
- get_bookmarks filter not supplying query argument (wp 3.1)
- Filter Posts by current Month
- Post Content, Special Characters and Filters
- Correct method of redirecting user login
- How to filter for user registration, be able to throw error message
- How to create ‘Local’ filters for WordPress srcset sizes in template parts?
- Admin filter for product SKU?
- Contact Form 7: Make field required after checkbox is checked
- Customize title, description and focused keyword [closed]
- Filtering the post list in the admin area
- Filter pre_get_posts does not modify Mine/All/Pending
- add_filter with retrieve_password_message() not working in plugin, but works in functions.php
- How to check if a protected hook is hooked?
- Upload restrictions – upload_mimes – filter: Adding multiple MIMEs for a single extension and adding multiple extensions for a single MIME type?
- How can I change the email that is inside the default email texts of wordpress?
- Modify message displayed on post save
- Something is filtering my shortcodes… Can’t figure out what
- Pass debug_backtrace() in WordPress filter
- Remove actions/filters that are set with create_function()
- I need to hook and change language of facebook sdk
- change “missing attachment” text functions.php
- Use has_filter on comment_post
- return get_the_tag_list with whitespace removed
- How do I add tags to entire comments, not just their text
- Modify author url display in edit-comments.php
- add_filter( ‘the_title’ gets through this if statement twice
- Changing the category for existing Gutenberg blocks
- Filter Post Title without affecting screen-reader-text
- Modify WordPress Page Title ()
- How to add lazy field in content endpoint using Gutenberg blocks
- how to use apply filter for Class?
- How can I see exactly what arguments are being passed through a filter so that I may modify them?
- Widget image reorganize layout
- Set Microsoft Word links to open in new window/tab
- WordPress get_avatar filter to match logins
- Modify category listing API response
- Change shortcode output (filter?)
- How do I add a class to all sidebars to let a Google Custom Search Engine know not to index the content?
- How to replace all images in all posts and pages with a different size?
- How to add a class to Buddypress avatars in the Activity stream? [closed]
- Updating User Profile on Registration
- ACF Load Field Groups Programmatically [closed]
- Why does using excerpt_more filter change link location?
- WordPress wp_lazy_loading_enabled returns loading attribute set to lazy
- Deregister Custom the_title Filter for edit_post_link
- Is it possible to dynamically change the “page_for_posts” option?
- How to apply_filter / add_filter within 2 others (simultaneous?) add_filter
- Is there a way to override only a portion of the function print_media_templates defined in wp-includes\media-template.php?
- How to override hook from themes functions.php which is defined in plugin
- Why is the change in my query not taking into account