Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $author_id = $wp_query->queried_object->ID; ?>
- function user_bio_visual_editor( $user ) {
- if (function_exists('wp_editor')):
- ?>
- <script type="text/javascript">
- (function($){
- $('#description').parents('tr').remove();
- })(jQuery);
- </script>
- <table class="form-table">
- <tr>
- <th><label for="description"><?php _e('Biographical Info'); ?></label></th>
- <td>
- <?php
- $description = get_user_meta( $user->ID, 'description', true);
- $editor_settings = array('media_buttons' => false);
- wp_editor( $description, 'description' , $editor_settings);
- ?>
- </td>
- </tr>
- </table>
- <?php
- endif;
- }
- add_action('show_user_profile', 'user_bio_visual_editor');
- add_action('edit_user_profile', 'user_bio_visual_editor');
- <?php if((get_the_author_meta('description', $author_id))!=""): ?>
- <?php echo get_the_author_meta('description', $author_id),"<br>"; endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement