• In the file ‘template-functions-author.php’ I’ve found the function ‘get_the_author_icq()’ and tried to add the user’s icq# after the fashion of template functions in ‘registration-functions.php’ and in ‘user-edit.php’. OK, the field ICQ appeared in user profile, but it’s not saved after updating profile. And thus, Loop function ‘<?php the_author_icq(); ?>’ does not work. How should I make it right?

Viewing 1 replies (of 1 total)
  • Thread Starter nefastis

    (@nefastis)

    So, I searched by now some more files and:
    1. in ‘user-edit.php’ I’ve added:

    <?php _e('ICQ:') ?>
    <input type="text" name="icq" value="<?php echo $profileuser->icq ?>" />

    2. in ‘registration-functions.php’:

    update_usermeta( $user_id, 'icq', $icq );

    3. in ‘template-functions-author.php’:

    function get_the_author_icq() {
    global $authordata;
    return $authordata->icq;
    }

    function the_author_icq() {
    echo get_the_author_icq();
    }

    4. in ‘admin-functions.php’:

    if (isset ($_POST['icq']))
    $user->icq = wp_specialchars(trim($_POST['icq']));
    </strong

    5. in ‘profile.php’:

    <?php _e('ICQ:') ?>
    <input type="text" name="icq" value="<?php echo $profileuser->icq ?>" />
    </strong

    and icq# is now saved. Did I make everything right?

Viewing 1 replies (of 1 total)
  • The topic ‘Add (ICQ) field to user’s profile’ is closed to new replies.