You can change the URL for the action
of the comment form like this:
add_filter( 'comment_form_defaults', 'wpse316762_comment_form_defaults' );
function wpse316762_comment_form_defaults( $defaults ) {
$defaults[ 'action' ] = site_url( '/error.php' );
return $defaults;
}
Related Posts:
- Get all images in post and comments like Twitter before post title
- What do comments with […] mean?
- Is it advisable to use $post->comment_count instead of get_comments_number( $post_id )
- How to implement a WordPress comments function?
- how to show comments only author which send own posts in wordpress
- How to put the author of the post in the comments?
- How to edit label_submit styling?
- Order posts alphabetically: how to set order=asc in mysql query?
- What do these phpMyAdmin errors mean on my WordPress databaes?
- Internal post link creates comments on its own
- How to get posts and comments amount per hour, per year and per month?
- Show comment number per author per day
- Custom setup of wordpress comments that are displayed
- Get all comments of author’s posts
- Change all author links in Blog roll
- SQL Command for restoring trashed comments
- disable Tab post on nav-menus page (Admin)
- Howto show comment count by post in post?
- Adding bootstrap classes to video shortcodes
- How do you change the comment count in the back end posts list, to reflect unapproved comments, rather than all comments?
- Every second post different class in blog view
- Format latest/newest post differently
- is_page Funtion for Posts ?
- Post type no single page
- Hide comments and posts posted by other user
- Let both the admin and post author update comment meta
- Get post meta retrieving wrong value
- Adding a user’s ID behind the tag ref link address
- The_excerpt() doesn’t parse – how to change that?
- How to only publish posts with image in it
- Isn’t the way posts are displayed very unefficient?
- Add custom text automatically on each post
- How to check in functions.php if there is data in a WP_Query?
- How to style archive post titles… but only those posts who have comments?
- restrict incrementation of post vies count when refreshing the page
- Defined function isn’t showed on page
- WordPress 302 Redirect to Random Product/Post/Page
- Database hacked – random posts are modified
- Getting Whitescreen when publishing a post [closed]
- Using system date format
- Get post by tag
- Add code to a specific post’s content
- Related Posts function not working
- the_content() Not Grabbing All Content
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- How does WP decide how to display a page
- Related Posts: Changing Function For Posts Per Page
- Display on page every post in blog WITH comments
- Query function not executed between element [closed]
- Optimize CPT-function with a loop
- Showing recent post of category in page
- Can WordPress handle following functionalities?
- saving/reading custom field value does not work – no value gets POSTed
- Same post appears in related Posts?
- Internal linking to posts permalink fail because of spaces and stripe at postname
- If post exists, make it a comment in existing post with same name?
- Have h2 tag not show up if there are no blog posts
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Making a wordpress page print friendly
- How to get post id of last approved comment?
- Auto post Spams on my wordpress blog?
- Help on conditional statement to accompany wp_insert_post function please?
- How to add content above footer in posts from specific category
- Set Default Post as Parent Child (Nested) Relation
- Allow / show post comments in category pages
- WordPress comment processing . Default unapproved comments detection before posting
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- Count the total views of all user posts published
- Shortcode for Comments and Comment Boxes in Post Loop
- Merge get_comments & get_posts into a single query
- get category in list of posts // shortcode for custom related posts
- shortcode // get posts by ids
- How do I make the comment disappear after deleting from the database?
- Check if almost 10 year old – working code is up to date
- Alt text attributes not showing over portfolio images
- Find most used words in post titles
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- $post->post_content empty while all other properties are correct
- Function is printing twice – any suggestions?
- How to add a custom class attribute into code wrapper? [duplicate]
- Remove the URL author of post on all comments
- Remove pagination if search returns empty
- Closing Comments conditionally in comments.php
- Remove HTML tags from all posts
- Set a post expiration and delete a post when expirate
- How can I automatically delete comments that contain a URL?
- WordPress weird behaviour on comments
- Comments are in database, don’t show up in WordPress backend or frontend
- No comments allowed
- Replace Tag Keyword With Link Within Post Content
- Excluding tag Link from html tags in Post content
- Save All Post Permalink From A Specific Category into a .txt file
- Spam written by registred users
- Changing a users posts to drafts upon role change
- Comment function for page
- AJAX load more posts not using correct category and repeating the same few posts
- How to Display Most View Post in the template file?
- Get post id outside loop : Notice: Trying to get property of non-object
- Show post excerpt
- How do I apply a wordpress function to something with no ID inside an archive page?