简体   繁体   中英

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM