Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @dedurus

    Member

    Seems that I found the solution to access individual activity ID, although not sure if this is a proper way to access it since I’m using “global $activities_template”.
    Here’s the code:

    `global $activities_template;
    //get single activity ID for loop in entry.php
    $act_ID = $activities_template->activity->id;
    // get activity
    $activity_get = bp_activity_get_specific( array( ‘activity_ids’ => $act_ID ) );
    // single out the activity
    $activity_single = $activity_get[0];
    $activity_body = $activity_single->content;`

    Thanks again

    @dedurus

    Member

    @r-a-y thanks for reply (i’m little late with mine).
    The problem is that I cannot determine the activity ID.
    In entry.php, i tried with bp_activity_id() function to wrap it in a query, but all I get is ID of the activity printed in the browser.
    How can I determine the activity ID in entry.php ?

    For example this code works (yet with native WP functions), but for static activity ID:

    $Fql = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$bp->activity->table_name} WHERE id = %d", 35));

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar