New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Get messages for user receive

  • Participant
    Level: Initiated
    Posts: 6
    Rossini on #12702

    Hi please what function buddypress can display the list of messages received by a user. I use the function below but it only works for the sender. Thank you

    $aParams [‘box’] = $this->box;
    $aParams [‘per_page’] = $this->per_page;
    $aParams [‘page’] = $page;
    $aParams [‘max’] = $this->limit;
    $aParams [‘user_id’] = get_current_user_id();

    //add_filter( ‘bp_loggedin_user_id’, ‘aheadzen_bp_loggedin_user_id_function’ );
    global $messages_template, $thread_template;
    $counter = 0;
    if ( bp_has_message_threads( bp_ajax_querystring( ‘messages’ ) ) ) {
    while ( bp_message_threads() ) {

    bp_message_thread();}}

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on #12718

    Hi Rossini,
    what you are looking for is

    https://github.com/buddypress/BuddyPress/blob/master/src/bp-templates/bp-legacy/buddypress/members/single/messages/messages-loop.php

    Please take a look at the template for all available options.

  • Participant
    Level: Initiated
    Posts: 6
    Rossini on #12740

    Yes, but it only returns the messages I sent in the first place and not what I received. I devellope a mobile application and I really need this

You must be logged in to reply to this topic.

This topic is: not resolved