bsym (@bsym)

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @bsym

    Participant

    What I want is to display a related topics base on forum

    need help

    😭

    @bsym

    Participant

    this code but not related to the article.

    `<?php $topics_post = array(‘post_type’ => bbp_get_topic_post_type(), ‘posts_per_page’ => 2);

    ?>
    <?php $widget_query = new WP_Query($topics_post); ?>
    <?php while ($widget_query->have_posts()) :
    $widget_query->the_post();
    $topic_id = bbp_get_topic_id($widget_query->post->ID);
    ?>

    <div class=”col-12 col-md-6″>
    <div class=”pr9-cards”>
    <div class=”pr9-cards–img pr9-supergraphicimg pr9-related-card”>
    ” title=”<?php bbp_topic_title($topic_id); ?>”><?php bbp_topic_title($topic_id); ?>
    <p class=”pr9-bbp-detail”><?php bbp_topic_excerpt($topic_id); ?></p>
    <p class=”pr9-bbp-author”>by <?php bbp_author_link(array(‘post_id’ => 1, ‘size’ => 100)); ?></p>
    <!– <span class=”reply”><?php bbp_forum_reply_count(); ?> reply count</span>
    <span class=”reply-date”><?php bbp_reply_post_date(0, true); ?></span> –>
    <br>
    “>More Detail

    </div>
    </div>
    </div>
    <?php endwhile; ?>’

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