Skip to:
Content
Pages
Categories
Search
Top
Bottom

Need help grabbing metadata from Site-Wide Activity posts?

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

    Moderator

    In the activity loop, there is no such thing as $post->ID.

    Try:

    $item_id = bp_get_activity_secondary_item_id();
    $songurls[] = get_metadata('post', $item_id, 'wpcf-song-upload', true);

    But if you know it’s post meta, why not use that function?
    $songurls[] = get_post_meta( $item_id, 'wpcf-song-upload', true);

    And put your foreach loop after the endwhile;

    @tstrickland415

    Participant

    Aaah! Thanks so much @shanebp!! Working now

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need help grabbing metadata from Site-Wide Activity posts?’ is closed to new replies.
Skip to toolbar