Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author donmik

    (@atallos)

    You have to take every post id and use “get_post” for example to get the post, then you can show the title.

    Thread Starter aburget

    (@aburget)

    Thx.

    Do you got an code example?

    I tried <?php echo bp_member_profile_data(‘field=Event’, $post_id); ?>

    but i still get only the post id.

    regards
    andrew

    Plugin Author donmik

    (@atallos)

    You need to use wordpress function:

    $post = get_post($post_id);
    echo $post->post_title;
    Thread Starter aburget

    (@aburget)

    No, doesn`t work. returns Buddypress Member Name as title.
    I want to show the select entries of custom post type selector.
    Sorry.

    thx
    andrew

    Plugin Author donmik

    (@atallos)

    It works but you need to read a little more the docs of wordpress… I think.
    This function:
    bp_member_profile_data( 'field=NAME' )
    returns an array with the post ids.

    You need to walk along this array. Something like this:

    $ids = bp_member_profile_data( 'field=NAME' );
    foreach ($ids as $post_id) {
    $post = get_post($post_id);
    echo $post->post_title;
    }

    Thread Starter aburget

    (@aburget)

    No, doesn*t work. Only get the ID of the custom post, but not the_title or excerpt.
    Sorry.

    thx
    andrew

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Post Type Multiselector hiw to use in template?’ is closed to new replies.