Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to get fields from the profile information with bp_member_profile_data

  • Avatar of mariazapata
    mariazapata
    Member

    @mariazapata

    Hello,
    I am having some difficulties on trying this make to work:
    `<?php $args = array(
    ‘field’ => ‘Location’,
    ‘user_id’ => $curauth->ID

    ); ?>
    `
    it just doesn’t display anything for me. Am i doing something wrong.
    I am running this code in the author wordpress page.
    Thanks very much for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of mariazapata
    mariazapata
    Member

    @mariazapata

    Hi commented this line out, on the bp_members_template.php
    //$user_id = 0;
    and it works… I didnt want to touch this… but i cant find any other way :(

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    ok… as I guess you know, modifying the core code isn’t a good solution!

    Am not sure why your original code isn’t working, as the later $r = wp_parse_args( $args, $defaults ); call should overwrite user_id with the one you supplied anyway.

    Did you check that $curauth->ID was set correctly?

    Avatar of mariazapata
    mariazapata
    Member

    @mariazapata

    Hello Roger,
    Yes I am sure that i set up that correctly $curauth->ID, is just a number….
    :S…
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.