Title: Show errors in create post form
Last modified: September 26, 2022

---

# Show errors in create post form

 *  Resolved [Jakes](https://wordpress.org/support/users/johanppmedia/)
 * (@johanppmedia)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/show-errors-in-create-post-form/)
 * Hi there,
 * We have a custom word blocker function for posts containing certain words, when
   creating a post from the dashboard this function is working fine. The function
   detects the words and displays an error on screen that user should remove the
   words that we highlight.
 * However from the wpuf form on the front end, once the user submits the form the
   spinning wheel just runs endlessly without showing the error words to be fixed,
   how can we display these normal wordpress post errors to users on the front-end?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Ehsanul Abrar](https://wordpress.org/support/users/ehsanulabrar/)
 * (@ehsanulabrar)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/show-errors-in-create-post-form/#post-16046860)
 * Hi [@johanppmedia](https://wordpress.org/support/users/johanppmedia/),
 * Thanks for sharing your issue.
 * Could you let me know in which field you tried to restrict word content?
 * Regards,
 *  Thread Starter [Jakes](https://wordpress.org/support/users/johanppmedia/)
 * (@johanppmedia)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/show-errors-in-create-post-form/#post-16046920)
 * Hi there [@ehsanulabrar](https://wordpress.org/support/users/ehsanulabrar/)
 * Thanks for the feedback ^^
 * It is the default WordPress content field: post_content
 * The below should give you an indication of the error to be shown with wp_die:
 *     ```
       if( count( $found_words ) === 0 )
           return;
         wp_die(
           sprintf(
             __(
               'Your post contains words that we do not allow ("%s"). Please remove them and try again.',
               'jhnpp'
             ),
             implode( '", "', $found_words )
       ```
   
 * Regards,
    -  This reply was modified 3 years, 8 months ago by [Jakes](https://wordpress.org/support/users/johanppmedia/).
 *  [Saiful Islam](https://wordpress.org/support/users/saifislam01/)
 * (@saifislam01)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/show-errors-in-create-post-form/#post-16051065)
 * Hi [@johanppmedia](https://wordpress.org/support/users/johanppmedia/),
 * This could be a JavaScript issue or a fatal error when submitting the post. if`
   WP_DEBUG` is true, and there is a fatal error, the error would be found in the
   debug log.
 * The JavaScript error can be seen by inspecting the element and going to the `
   console` tab as you can see in the screenshot: [https://prnt.sc/mhGcJ80vLEiw](https://prnt.sc/mhGcJ80vLEiw)
 * Hope you understand.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Show errors in create post form’ is closed to new replies.

 * ![](https://ps.w.org/wp-user-frontend/assets/icon-256x256.gif?rev=3578622)
 * [User Frontend: AI Powered Frontend Posting, User Directory, Profile, Membership & User Registration](https://wordpress.org/plugins/wp-user-frontend/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-user-frontend/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-user-frontend/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-user-frontend/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-user-frontend/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-user-frontend/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Saiful Islam](https://wordpress.org/support/users/saifislam01/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/show-errors-in-create-post-form/#post-16051065)
 * Status: resolved