Forums

aleph, Cimy integration (3 posts)

  1. monarchmdm
    Member
    Posted 2 years ago #

    I found this code to add ONE extra field but how do I add ALL extra fields from Cimy or even just another field from Cimy? I am using it with aleph. The code is below, thanks.

    <?php get_header(); ?>

    <!--

    This is a example template for Aleph.
    The function aleph_user_profile() outputs a formatted profile. You need to put it between the adequate markup of your template.

    -->
    <div id="content" class="narrowcolumn">

    <?php
    add_action('aleph_user_profile_fields', 'display_user_cimy_field');

    function display_user_cimy_field() {
    $address = aleph_get_user_cimy_field("address");
    if ($address) {
    echo '<dt>Address</dt>';
    echo '<dd>' . $address . '</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>'
    )
    );
    ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Most, if not all usermeta based fields can be retrieved with http://codex.wordpress.org/Function_Reference/get_usermeta

  3. monarchmdm
    Member
    Posted 2 years ago #

    Thanks, I am not good enough to know what to do with that. I want to add a phone number to the profile code above. I created and added a "phone" field to the cimy extra user fields plug in. Any way you could throw that (or an example of it) intio the code aboe using any field. i will replace with phone if needed but "phone" is the field and will pull it. I tried duplicating the code and it whacks it out.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags