'Don't redirect users to wp-comments-post.php instead show required directly in input fields

I am looking forward to 2 things:

  1. Rename "wp-comment-post" to any other name

  2. Don't redirect users to the wp comment error page.

I have found a website that shows comment error messages on the form without any redirection. I am looking forward to something like that.

I'm sharing 1 blog post of that website, when you scroll down to the comment form, you can discover that the error is showing on the form. Which looks really nice and simple.

Link: https://neilpatel.com/how-to-start-a-blog/

Please help me out with codes and which files to put those.

Thanks in advance!



Solution 1:[1]

I had the same issue. Check the code below within your theme and remove 'comment-form' and 'comment-list'.

    add_theme_support(
                'html5',
                array(
                    'search-form',
                    //'comment-form',
                    //'comment-list',
                    'gallery',
                    'caption',
                )
            );

Note this question should be on WordPress stackoverflow.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nuno Sarmento