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?
- How to change the case of all post titles to “Title Case”
- Code to auto expire posts after 30 days
- List only child categories a post is in, of a specific parent category
- One comment per user email per post
- Can’t show comments count per post outside loop
- How to change post status from publish to draft using hook in wordpress?
- How to output comments number of a post per day?
- Custom wp_trim_words() function not trimming right
- Hide comments awaiting moderation from user who submitted the comments
- Allow role to delete posts but block him the wp-admin
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- WP_Query in functions.php overrides global $post object, even with wp_reset_query()
- Limit function to specific post category
- Hide Post comments when displayed via WP_Query
- Including new Javascript only after a comment is made
- Function to show random posts from a category
- Display posts with comments closed, with pagination?
- Invisible spam post in backend
- Posts vs. Pages
- Action hook for new pending posts?
- count the total number of comments the user has received for his published posts
- Uppercase first sentence in every post
- Ajax posts filter by date, comments, top views, top likes
- Prepend or add an Image to the content of a Post
- Why content_arr[‘extended’] removes paragraph tags?
- How to Orderby Comments by post title?
- If modified on same day, show only time
- Email entire post contents
- Query get post,how to add comment box
- Update all comments time to random dates?
- How to do set post permalinks using 6 digit random unique function?
- Move comments only from one WP installation to another
- Second comments section for one post/page
- How to assign classes to all elements?
- Display post x of y within category
- WordPress Automatic Filename Changer
- What do these phpMyAdmin errors mean on my WordPress databaes?
- Internal post link creates comments on its own
- Custom setup of wordpress comments that are displayed
- Get all comments of author’s posts
- SQL Command for restoring trashed comments
- Adding bootstrap classes to video shortcodes
- Add custom text automatically on each post
- WordPress 302 Redirect to Random Product/Post/Page
- Database hacked – random posts are modified
- Getting Whitescreen when publishing a post [closed]
- Add code to a specific post’s content
- Un-highlight Blog Menu Item when Category Menu Item is Selected
- Related Posts: Changing Function For Posts Per Page
- Optimize CPT-function with a loop
- Can WordPress handle following functionalities?
- Same post appears in related Posts?
- If post exists, make it a comment in existing post with same name?
- Making a wordpress page print friendly
- Set Default Post as Parent Child (Nested) Relation
- Allow / show post comments in category pages
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- get category in list of posts // shortcode for custom related posts
- How do I make the comment disappear after deleting from the database?
- Alt text attributes not showing over portfolio images
- WordPress Sticky Post Count “Fix” Breaking Pagecount by 72 pages!
- Function is printing twice – any suggestions?
- Set a post expiration and delete a post when expirate
- Excluding tag Link from html tags in Post content
- Save All Post Permalink From A Specific Category into a .txt file
- Changing a users posts to drafts upon role change
- How to Display Most View Post in the template file?
- Show post excerpt
- How do I apply a wordpress function to something with no ID inside an archive page?
- Show all posts from the tags without having to set all of them
- Show author bio box
- Trim excerpt to first paragraph
- How can I return the result of my custom function?
- Call image from post on index page?
- No comments on static front page
- Trash a post, send associated comments into the trash bin (change status)
- How to limit the number of results for all query_posts on mysite
- External link not showing on post but showing on comment
- Get url/link to latest comments in a post
- Display only posts with comments
- User driven content problems
- wp_query select if have comments
- 2 tick boxes appearing below comments
- Admin moderates ALL comments (including post author)
- Notify Author of the post if admin deletes his post and perform some function
- How do we display a certain category type on a page while hiding all others?
- Show List of Posts With Comments Open
- How can I show the positive and negative comments for a same post separately?
- What function does the loop of displaying posts?
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- Undefined Function Fatal Error with Shortcode [closed]
- How to use shortcode to get the second to newest post?
- How to sort posts alphabetically based on a specific parent category