Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I get a rehply post ID using a specific post ID?


  • eigodeasobo
    Participant

    @eigodeasobo

    Hi all,

    How can I get a reply post ID using a specific post ID?

    For example, I want to get 1 using 3.

    0
    |–1
    |–|–2
    |–|–3

    I can not do with the following code:
    <?php echo bbp_get_form_reply_to(3);?>

    How write it?

    Thanks.

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

  • Robin W
    Moderator

    @robin-w

    sorry I do not understand

    topic ID = 100
    first reply to topic ID 100 = 105
    second reply to topic ID 100 = 107
    third reply to topic ID 100 = 108

    so which number are you starting with and which number do you want?


    eigodeasobo
    Participant

    @eigodeasobo

    sorry, I re-wrote that.

    ▼For example:

    topic ID = 100
    -first reply to topic ID 100 = post ID 105
    --first reply to post ID 105 = post ID 106
    -second reply to topic ID 100 = post ID 107
    -third reply to topic ID 100 = post ID 108
    --first reply to post ID 108 = post ID 109
    ---first reply to post ID 109 = post ID 110
    ---second reply to post ID 109 = post ID 111

    ▼I expect the following get:

    Get 0 using 105, 107, 108.
    <?php echo bbp_get_form_reply_to(105); //Get 0 ?>
    <?php echo bbp_get_form_reply_to(107); //Get 0 ?>
    <?php echo bbp_get_form_reply_to(108); //Get 0 ?>

    Get 105 using 106.
    <?php echo bbp_get_form_reply_to(106); //Get 105 ?>

    Get 108 using 109.
    <?php echo bbp_get_form_reply_to(109); //Get 108 ?>

    Get 109 using 110, 111.
    <?php echo bbp_get_form_reply_to(110); //Get 109 ?>
    <?php echo bbp_get_form_reply_to(111); //Get 109 ?>

    I want to obtain the reply ID based on the post ID.

    Thanks.


    Robin W
    Moderator

    @robin-w

    before I dig into this can you try (or have you)

    bbp_get_reply_to (xxx)


    eigodeasobo
    Participant

    @eigodeasobo

    Thanks a lot!!

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