Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get reply IDs from topic


  • vincenzon617
    Participant

    @vincenzon617

    Is there a way to get all the reply IDs from a topic? I would like to get all the reply IDs from a specific topic (preferably by passing in the topicID) and then pass these IDs into a function that I have made already.

    I have looked to see if there is a function to do this but can’t seem to find one, I’m sure I have missed some though! The only thing that I found was the function bbp_get_all_child_ids() but I am unsure how to use it/don’t know if it is what I am looking for.

    Thanks in advance!

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

  • Robin W
    Moderator

    @robin-w

    a quick look at that function would seem to be

    $ids = bbp_get_all_child_ids($topicID , bbp_get_topic_type) ;


    Robin W
    Moderator

    @robin-w

    or

    $ids = bbp_get_all_child_ids($topicID , bbp_get_reply_type) ;


    vincenzon617
    Participant

    @vincenzon617

    Thanks, Robin works great, although the bbp_get_reply_type and bbp_get_topic_type caused an error so I replaced it with bbp_get_all_child_ids($topicID, 'reply'); and it seems to have done the trick!


    Robin W
    Moderator

    @robin-w

    ah yes, it should have been

    bbp_get_reply_type()

    to make it a function, but ‘reply’ is equally as good

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar