Title: User Edit Option
Last modified: November 4, 2016

---

# User Edit Option

 *  [mishika](https://wordpress.org/support/users/mishika/)
 * (@mishika)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/user-edit-option/)
 * Hi,
 * Is there a way to edit your post if some user has accidentally written something
   wrong or post. I saw an option in permission settings and i want my users/subscribers
   to be able to edit their own answer/post but when i enabled that option..it gives
   permission to edit all the post including the admin.
    Please help.
 * Thanks

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

 *  Plugin Author [DesignWall](https://wordpress.org/support/users/designwall/)
 * (@designwall)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/user-edit-option/#post-8404784)
 * Hi,
    Thanks for contacting DesignWall.
 * About this matter, you need to add the function below into wp-conten/themes/theme-
   folder/functions.php
 * add_filter( ‘dwqa_question_button_action’, ‘dwqa_theme_question_button_action’);
   
   function dwqa_theme_question_button_action() { $html = ”; if ( is_user_logged_in()){
   $followed = dwqa_is_followed() ? ‘followed’ : ‘follow’; $text = __( ‘Subscribe’,‘
   dwqa’ ); $html .= ‘<label for=”dwqa-favorites”>’; $html .= ‘<input type=”checkbox”
   id=”dwqa-favorites” data-post=”‘. get_the_ID() .'” data-nonce=”‘. wp_create_nonce(‘
   _dwqa_follow_question’ ) .'” value=”‘. $followed .'” ‘. checked( $followed, ‘
   followed’, false ) .’/>’; $html .= ‘<span>’ . $text . ‘</span>’; $html .= ‘</
   label>’; if ( dwqa_current_user_can( ‘edit_question’, get_the_ID() ) || dwqa_current_user_can(‘
   manage_question’ ) ) { $html .= ‘ get_the_ID() ), get_permalink() ) .'”>’ . __(‘
   Edit’, ‘dwqa’ ) . ‘ ‘; }
 *  if ( dwqa_current_user_can( ‘delete_question’, get_the_ID() ) || dwqa_current_user_can(‘
   manage_question’ ) ) {
    $action_url = add_query_arg( array( ‘action’ => ‘dwqa_delete_question’,‘
   question_id’ => get_the_ID() ), admin_url( ‘admin-ajax.php’ ) ); $html .= ‘[‘ . __( ‘Delete’, ‘dwqa’ ) . ‘](https://wordpress.org/support/topic/user-edit-option/&apos;. wp_nonce_url( $action_url, &apos;_dwqa_action_remove_question_nonce&apos; ) .&apos;?output_format=md)‘;}}
 *  return $html;
    }
 * add_filter( ‘dwqa_answer_button_action’, ‘dwqa_theme_answer_button_action’ );
   
   function dwqa_theme_answer_button_action() { $html = ”; if ( is_user_logged_in()){
   if ( dwqa_current_user_can( ‘edit_answer’, get_the_ID() ) || dwqa_current_user_can(‘
   manage_answer’ ) ) { $parent_id = dwqa_get_question_from_answer_id(); $html .
   = ‘ get_the_ID() ), get_permalink( $parent_id ) ) .'”>’ . __( ‘Edit’, ‘dwqa’ ).‘‘;}
 *  if ( dwqa_current_user_can( ‘delete_answer’, get_the_ID() ) || dwqa_current_user_can(‘
   manage_answer’ ) ) {
    $action_url = add_query_arg( array( ‘action’ => ‘dwqa_delete_answer’,‘
   answer_id’ => get_the_ID() ), admin_url( ‘admin-ajax.php’ ) ); $html .= ‘[‘ . __( ‘Delete’, ‘dwqa’ ) . ‘](https://wordpress.org/support/topic/user-edit-option/&apos;. wp_nonce_url( $action_url, &apos;_dwqa_action_remove_answer_nonce&apos; ) .&apos;?output_format=md)‘;}}
 *  return $html;
    }
 * If you have more questions, feel free to ask.
 *  [joydipkar73](https://wordpress.org/support/users/joydipkar73/)
 * (@joydipkar73)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/user-edit-option/#post-8445268)
 * $html .= ‘ get_the_ID() ), get_permalink() ) .’”>’ . __( ‘Edit’, ‘dwqa’ ) . ‘‘;
 * is the above line ok?
 * pls give a working code … i am not a programmer.

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

The topic ‘User Edit Option’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/dw-question-answer_fefdf9.svg)
 * [DW Question & Answer](https://wordpress.org/plugins/dw-question-answer/)
 * [Support Threads](https://wordpress.org/support/plugin/dw-question-answer/)
 * [Active Topics](https://wordpress.org/support/plugin/dw-question-answer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dw-question-answer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dw-question-answer/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [joydipkar73](https://wordpress.org/support/users/joydipkar73/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/user-edit-option/#post-8445268)
 * Status: not resolved