Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
737 views
in Q2A Core by
reopened by

1 Answer

+2 votes
by
selected by
 
Best answer

The simple approach will be to hack the core by editing file qa-include/plugins/qa-widget-ask-box.php.

Edit based on comments (removing the label of the editor):

1. Edit file qa-theme/<your-theme>/qa-theme.php

2. Add (if it doesn't exist) or merge (if it already exists) this function:

public function initialize() {
    parent::initialize();
    if ($this->template === 'ask') {
        unset($this->content['form']['fields']['content']['label']);
    }
}

Edit based on comments (removing the whole editor field):

1. Navigate to admin/posting and set Default editor for questions as Basic Editor.

2. Edit file qa-theme/<your-theme>/qa-theme.php

3. Add (if it doesn't exist) or merge (if it already exists) this function:

public function initialize() {
    parent::initialize();
    if ($this->template === 'ask') {
        unset($this->content['form']['fields']['content']);
    }
}
by
Thanks for your reply pupi,

but i want to remove that "more information for the question" box from the ask box

but i cant able to do it with css
by
+1
Oh, but that's not the askbox widget. That's just the ask page. Check the answer again
by
i have added the code... but still the input box for "more information for your question" is visible

i actually want to remove that...
by
+1
This is what I see after applying the change: https://imgur.com/a/CfGReku

Are you sure you're adding the function properly?
by
I have seen the image file you sent....

Still that editor box appears.... I dont want any editor box or input box for "more information for your question"
by
+1
Oh,I thought you just wanted to remove the "more information for the question" label. To remove the whole editor field check the edited answer
by
Thank you veey much puppi for your answer
...