Title: Code for ask a question text box
Last modified: August 31, 2016

---

# Code for ask a question text box

 *  [jrhoh](https://wordpress.org/support/users/jrhoh/)
 * (@jrhoh)
 * [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/)
 * I would like to know where in the wordpress plugin editor I can find the coding
   for the textbox where you ask a question. I have looked through several of the
   files and I just can’t find it. I would like to remove the option to type code
   into this box as my users do not need to be typing code into the ask a question
   box. Please inform me on where I can find the coding for the text box. Thank 
   you.
 * [https://wordpress.org/plugins/dw-question-answer/](https://wordpress.org/plugins/dw-question-answer/)

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

 *  Plugin Author [DesignWall](https://wordpress.org/support/users/designwall/)
 * (@designwall)
 * [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/#post-7314387)
 * Hi,
 * You can add the following code to the functions.php file of your theme:
 *     ```
       add_filter( 'dwqa_tinymce_toolbar1', 'dwqa_disable_tinymce_options' );<br />
       function dwqa_disable_tinymce_options( $button ) {<br />
              return 'bold,italic,underline,|,'.'bullist,numlist,blockquote,|,'.'image,|,'.'spellchecker,fullscreen,|,';<br />
       }
       ```
   
 * Hope this helps!
    Dominic from DesignWall team.
 *  Thread Starter [jrhoh](https://wordpress.org/support/users/jrhoh/)
 * (@jrhoh)
 * [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/#post-7314586)
 * That did some of what I wanted it to do. One thing though, I would also like 
   to remove the tab that says text on it as my users do not need this tab either.
   If you could get me the code that would remove that tab too, that would be greatly
   appreciated. Thank you.
 *  Plugin Author [DesignWall](https://wordpress.org/support/users/designwall/)
 * (@designwall)
 * [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/#post-7314604)
 * You can add the following code to the style.css file:
 *     ```
       .wp-switch-editor {
           display: none;
       }
       ```
   
 * Hope this helps!
 *  Thread Starter [jrhoh](https://wordpress.org/support/users/jrhoh/)
 * (@jrhoh)
 * [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/#post-7314610)
 * Thank you, that seemed to work just fine, I just had one more question. I noticed
   that the post time for the questions/answers was off by six hours. I was wondering
   if there was a way to fix that and, if possible, how I would go about fixing 
   that. Thanks.
 *  Plugin Author [DesignWall](https://wordpress.org/support/users/designwall/)
 * (@designwall)
 * [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/#post-7314615)
 * To resolve the time issue on your site you can do the following solution:
    About
   list question page, you can open the content-question.php file, find line 17.
   Replace it with the following code:
 * `$time = human_time_diff( get_post_time( 'U' ), current_time('timestamp'));`
 * you can open the content-single-question.php file and find the line 19.
    Replace
   the following code:
 * `<?php printf( __( '<span>%s%s %s asked %s ago</span>', 'dwqa' ), dwqa_get_author_link(
   $user_id ), get_avatar( $user_id, 48 ), dwqa_get_author(), dwqa_print_user_badge(
   $user_id ), human_time_diff( get_post_time( 'U' ) ) ) ?>`
 * With new code:
 * `<?php printf( __( '<span>%s%s %s asked %s ago</span>', 'dwqa' ), dwqa_get_author_link(
   $user_id ), get_avatar( $user_id, 48 ), dwqa_get_author(), dwqa_print_user_badge(
   $user_id ), human_time_diff( get_post_time( 'U' ), current_time('timestamp') ))?
   >`
 * Regards,
    Dominic from DesignWall Team.

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

The topic ‘Code for ask a question text box’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [DesignWall](https://wordpress.org/support/users/designwall/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/code-for-ask-a-question-text-box/#post-7314615)
 * Status: not resolved