thinhmmt
asked 5 years ago

Sorry for the inconvenience, i’m setting my QA page and i don’t wan’t user post url in question content and answer question contnent. Can you help me ?

1 Answers
DominicStaff
answered 5 years ago

You can add the following code to your functions.php file: 

add_action( 'admin_print_scripts-post.php',     'wpse22643_overwrite_wplinks' );
add_action( 'admin_print_scripts-post-new.php', 'wpse22643_overwrite_wplinks' );
function wpse22643_overwrite_wplinks( $hook ) {
   // register is important, that other plugins will change or deactivate this
    wp_register_script(
        'overwrite-wplinks', 
        get_stylesheet_directory_uri() . '/js/overwrite-wplinks.js',
        array( 'jquery' ),
        '',
        TRUE
    );
    wp_enqueue_script( 'overwrite-wplinks' );
}  

Then add the following code to your Dashboard > Customize > CSS code:

#wp-dwqa-answer-content-editor-container .wp-switch-editor { display: none; }
Powered by DW Question & Answer Pro