Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • floris
    Participant

    @floris

    Hello guys,

    I’m trying to tweak the way post images are displayed in the activity stream and to link them to the parent post. These secondary_item_id and the bp_blogs_record_activity seem to be relevant, but am unsure how to proceed…

    For entry.php I was thinking of adding something like:

    if ( $attachments = get_posts( array(

    ‘numberposts’ => 1,

    ‘orderby’ => ‘menu_order ID’,

    ‘post_mime_type’ => ‘image’,

    ‘post_parent’ => somethingsomething,

    ‘post_status’ => null,

    ‘post_type’ => ‘attachment’,

    ) ) ) {

    foreach ( $attachments as $attachment ) {

    $link = get_permalink( $attachment->post_parent );

    $source = wp_get_attachment_image_src( $attachment->ID, ‘medium’ );

    echo ‘<img src=”‘ . $source[0] . ‘” />‘;

    }

    }

    However, not sure how to get post id for post_parent. When working it should improve things. Possible you think?

    F.

Viewing 1 replies (of 1 total)
Skip to toolbar