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 to show page content in feed?
- Sanitize and data validation with apply_filters() function
- remove_filter( ‘the_content’, ‘wpautop’ ); only for certain post types
- Valid characters for actions, hooks and filters
- How to hook into unregistering a widget instance?
- How do I use the ‘http_request_host_is_external’ filter
- AJAX filter posts on click based on category
- Can I add custom meta for each image uploaded via media-upload.php?
- How do I know if author field was changed on post save?
- Some questions regarding filter
- Too many actions/filters!
- Which hook is fired when inserting media into a post
- How can override a add_filter of a plugin?
- Adding Filter Conditionally Per Page ID
- How to specify which category of the post to use in case of multiple categories
- Nested calls the the_content filter
- How to change domain used when pinging sites
- return values from hooks do_action and apply_filters, which is better
- Return a custom value in a function added to an action hook
- Using Conditional Statement in functions.php
- get_title without filter(the_title)
- How can filters be run when they are never applied?
- Multiple filters for wp_get_archive
- Filter and modify entry-footer link in twentyseventeen
- Function the_content not working
- Extending body classes in front- and backend
- Is there a filter called ‘network_admin_init’?
- Break out of wordpress filter
- Manipulating show_on_front, page_on_front, page_for_posts and template hierarchy
- Post Content, Special Characters and Filters
- Add filter problems
- Where is the content cache when using apply_filters(‘the_content…?
- How to prepare WordPress Rest data for Preview Changes?
- How to validate recaptcha on comments form?
- Does a plugin with a AJAX button filter exist? [closed]
- Is there any filter to trigger as soon as media is uploaded to post or page?
- Filtering the post list in the admin area
- add_filter with retrieve_password_message() not working in plugin, but works in functions.php
- 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?
- Unique design inside a specific category’s url
- Conditional does not work with add_filter
- 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
- Shorten the title length
- Problem with Class, Filters and Callbacks
- Renaming wordpress login and get new password button
- Parse a shortcode differently based on on what it’s nested in
- 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?
- Re-order search results with posts_orderby filter and post meta value
- Set Microsoft Word links to open in new window/tab
- WordPress get_avatar filter to match logins
- Modify category listing API response
- ‘the_content’ Filter delivers empty string with lengh (608)
- Output dynamic_sidebar_params in wp_head
- How to sort posts according to meta value?
- 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
- remove_filter excerpt_more from a plugin class
- ACF Load Field Groups Programmatically [closed]
- Why does using excerpt_more filter change link location?
- Filter a custom post type by custom field in admin
- Search and Filter Using Custom Post Type, Custom Taxonomy, and Advanced Custom Fields