Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • lonepalmus
    Participant

    @lonepalmus

    Thanks! But I registered the custom post type and it goes to the activity stream fine. The problem is the custom fields. I hook into bp_blogs_activity_new_post_content and I’m able to output the title and content fine. I ended up just using the post title in the activity stream, which is fine for now, but it would be great to be able to output some custom fields in the stream in the future.

    Thanks for your help!


    lonepalmus
    Participant

    @lonepalmus

    @henrywright and @shanebp site tracking is enabled. And just to be sure I double-checked 🙂


    @shanebp

    I tried changing the priority, it didn’t change anything though. I recall having read something similar at a point about having to save as a draft – will look into and see if I can get anything out of it 🙂

    Thanks a mil both for your time!


    lonepalmus
    Participant

    @lonepalmus

    yeah, I know the $post_title isn’t really being used in this case. I just forgot to remove it. Unfortunately it doesn’t make a difference, even though i remove it.

    Could it be that the post-meta isn’t available at this point? Though i don’t see why it shouldn’t be, when the title and content are.


    lonepalmus
    Participant

    @lonepalmus

    Thanks for the replies!

    so in this case I want to use the metadata to change the content-part of the activity-stream:

    add_filter( 'bp_blogs_activity_new_post_content', 'record_post_activity_content', 1, 4 );
    
    function record_post_activity_content($activity_content, $post, $post_permalink, $post_title){
        if( $post->post_type == 'workout' ) {
         	$activity_content = get_post_meta( $post->ID, 'rute', TRUE );   
        }
            return $activity_content;
    }

    if I inside that function echo $post->ID; it shows the id fine – so it should be able to get the meta?


    lonepalmus
    Participant

    @lonepalmus

    yeah that’s what i thought. it might not be the easiest tasks.

    It seems as if it would be something more people would have looked into, but I’ve searched high and low and no answers (or questions for that matter.)

    Would you have any ideas as how to override BP_Messages_Box_Template() class?

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