WordPress.org

Ready to get started?Download WordPress

Forums

el-Aleph & Cimy (3 posts)

  1. janpaulmeijer
    Member
    Posted 5 years ago #

    In which file should i add

    add_action('aleph_user_profile_fields', 'display_user_cimy_field');

    function display_user_cimy_field() {
    $gender = aleph_get_user_cimy_field("Gender");
    if ($gender) {
    echo '<dt>Gender</dt>';
    echo '<dd>' . $gender . '</dd>';
    }
    }

    to make aleph work in combination with cimy extra user fields?

  2. CrisBloomfield
    Member
    Posted 5 years ago #

    You need to add it into the profile.php document. You need to check that your theme has the profile.php and users.php document, if not copy the examples one across tweaking them to work with your theme if necessary.

    Then modify the profile.php file like this:

    <?php
    add_action('aleph_user_profile_fields', 'display_user_cimy_field');
    
    function display_user_cimy_field() {
        $gender = aleph_get_user_cimy_field("gender");
        if ($gender) {
            echo '<dt>Gender</dt>';
            echo '<dd>' . $gender . '</dd>';
        }
    }
    aleph_user_profile(
    array(
    'before_title' => '<h2 class="center">',
    'after_title' => '</h2>',
    'before_section' => '<div class="entry"><h3>',
    'after_section' => '</h3>',
    'before_avatar' => '<div style="float: right;">',
    'after_avatar' => '</div></div>'
    )
    );
    ?>
  3. monarchmdm
    Member
    Posted 4 years ago #

    You advice worked for me thank you. Is there a way to add all the extra field or even additional extra fields? In may case I replaced Gender with address and have that up but now want to add phone number...

Topic Closed

This topic has been closed to new replies.

About this Topic