Skip to:
Content
Pages
Categories
Search
Top
Bottom

Print bbp_forum_title() inside/before topic title?


  • HoggeHog
    Participant

    @hoggehog

    Hello!

    I’m looking to output the forum title inside- and before every topic title. So it would read like:
    [Forum 1] Topic title
    [Forum 2] Topic title

    I want to use the shortcode [bbp-topic-index], but then need to visually separate the topics somehow.

    My _very_ basic knowledge of php says to add bbp_forum_title() somewhere around bbp_before_topic_tile(), but I’m not sure how to piece that together into functioning code. Anyone got any ideas or pointers?

    P.S. Please don’t laugh if I sound like an idiot, I’m learning very slowly 🙂

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

  • HoggeHog
    Participant

    @hoggehog

    So I figured out how to do it, now I’m trying to color-code every forum.


    HoggeHog
    Participant

    @hoggehog

    So I’ve got

    <?php do_action( 'bbp_theme_before_topic_title' ); ?>

    <span class="bbp-topic-started-in"><?php printf( __('%2$s', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span>

    "><?php bbp_topic_title(); ?>

    And if the forum id equals 8397, I want to assign a different class to it… <?php if ( bbp_get_topic_forum_id() == 8397 )

    But I’m a bit stuck here. Any suggestions?

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