DW q and A plugin on my site seems to be corrupt. I am missing the abbility to create a question for example.
Under DW Q&A in the dashboard ive only got 3 choices: “Question categioes”, “Question tags” and “Settings”. No “All questions”, “Ad new” and so on.
I´ve tried to unistall the plugin and installed again, but no luck.
1 Answers
After updating he latest version 1.2.9, you can not find the All Question & All Answer in BackEnd and to resolve this issue, you can open the dw-question-answer.php file in the folder path “wp-content\plugins\dw-question-answer”. Find/Replace the line 141 to line 224, with new code:
/* Question Posttype Registration */
$question_labels = array(
'name' => _x('Question', 'post type general name'),
'singular_name' => _x('Question', 'post type singular name'),
'add_new' => _x('Add New', 'theme'),
'add_new_item' => __('Add New Question'),
'edit_item' => __('Edit Question'),
'new_item' => __('New Question'),
'all_items' => __('All Questions'),
'view_item' => __('View Question'),
'search_items' => __('Search Question'),
'not_found' => __('No questions found'),
'not_found_in_trash' => __('No questions found in Trash'),
'parent_item_colon' => '',
'menu_name' => __('DW Q&A')
);
$question_args = array(
'labels' => $question_labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array(
'slug' => $question_rewrite,
'with_front' => false
),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => '',
'supports' => array( 'title', 'editor', 'comments', 'author', 'page-attributes' ),
'capabilities' => array(
'edit_post' => 'dwqa_can_edit_question',
'edit_posts' => 'dwqa_can_edit_question',
'edit_others_posts' => 'dwqa_can_edit_question',
'publish_posts' => 'dwqa_can_post_question',
'read_post' => 'dwqa_can_read_question',
'read_private_posts' => 'read_private_posts',
'delete_post' => 'dwqa_can_delete_question'
)
);
register_post_type( 'dwqa-question', $question_args );
/* Question Posttype Registration */
$answer_labels = array(
'name' => _x('Answer', 'post type general name'),
'singular_name' => _x('Answer', 'post type singular name'),
'add_new' => _x('Add New', 'theme'),
'add_new_item' => __('Add new answer'),
'edit_item' => __('Edit answer'),
'new_item' => __('New Answer'),
'all_items' => __('All Answers'),
'view_item' => __('View Answer'),
'search_items' => __('Search Answer'),
'not_found' => __('No Answers found'),
'not_found_in_trash' => __('No Answers found in Trash'),
'parent_item_colon' => '',
'menu_name' => __('Answer')
);
$answer = array(
'labels' => $answer_labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => 'edit.php?post_type=dwqa-question',
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => false,
'hierarchical' => true,
'menu_icon' => '',
'supports' => array( 'title', 'editor', 'comments', 'custom-fields', 'author', 'page-attributes' ),
'capabilities' => array(
'edit_post' => 'dwqa_can_edit_answer',
'edit_posts' => 'dwqa_can_edit_answer',
'edit_others_posts' => 'dwqa_can_edit_answer',
'publish_posts' => 'dwqa_can_post_answer',
'read_post' => 'dwqa_can_read_answer',
'read_private_posts' => 'read_private_posts',
'delete_post' => 'dwqa_can_delete_answer'
)
);
register_post_type( 'dwqa-answer', $answer );
Please login or Register to submit your answer