Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add the post_id in the bp_activity_add function


  • ayanei
    Participant

    @ayanei

    Hi !
    I would like to create an post-based contextual activity stream to create an activity that is related to the post where we wrote it, I almost done.
    I’m using a shortcode on the function.php to show the activity stream by specifying that primary_id is equal to get_the_id() and for now it works but only not dynamically by manually editing in the bp-activity-function.php file the function bp_activity_add() and assigning to item_id the id of an article. And in this post, I’ve my contextual activity stream.

    I am stuck because I can not dynamically get the id value of the article from which the activity is created. I have tried many solutions like using get_the_id () in the page bp-activity-function.php but the post_id is always 0 or null.

    Do you have an idea ? Thanks !

  • You must be logged in to reply to this topic.
Skip to toolbar