Is it possible to set a Question category by default in the New Question form?
I would like the selection to be set to ‘Questions’ by default instead of ‘Select a category’,
To set a question category by default, you can go to your theme folder and create a new folder , named it
Inside your new folder, create a new file:
Now, open up the new file in notepad or any code editor, and copy/paste the code at this link: http://snippi.com/s/b3p4x1w
Then find the line 41:
'selected' => isset( $_POST['question-category'] ) ? $_POST['question-category'] : false,
Replace with the following code:
'selected' => Your Categories ID
Note: You can find your categories ID In backend, when you edit a category, you will see your category ID in the URL on your browser address bar which looks like this:
Hope this helps!
Please login or Register to submit your answer