Skip to:
Content
Pages
Categories
Search
Top
Bottom

featured pictures for forums?

Viewing 1 replies (of 1 total)

  • Shmoo
    Participant

    @macpresss

    If you know a little CSS and you’re not afraid the change the bbPress templates a little you can make this happen with through the forum_id(); which is unique for each forum.

    Take a look inside loops-forums.php ( the template that starts the forums loop ) you’ll find this. <?php bbp_forum_id(); ?>

    Copy that, next open your loop-single-forum.php and paste that code where you would like your image to show up.
    For example something like this could be possible.

    
    <img class="bbp-featured-img" src="http://example.org/images/forums/featured_forum_<?php bbp_forum_id(); ?>.png" alt="<?php bbp_forum_title(); ?>" /><a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
    

    All you have to do now is make sure you call your forum images featured_forum_[ID].png and upload them to the path you set in the image tag.

    If you Hover over the forum names at the WP back-end you’ll see where the URL-page is pointing to if you would’ve clicked it, this link has a number like 88 or something, each forum has an unique number so your could pick that number and call it in your images, featured_forum_88.png >> upload the image and it will show up next to the forum title.

    Change-/position it a little by CSS ( img.bbp-featured-img { } ) and you’re done.

    I’ve done this myself the same way only with icon-fonts in front of the forum titles.
    It’s a little bit of customization and it has a static feeling but it’s not that difficult and works perfect.

    Edit

    Almost forgot to say, don’t change the bbPRess template files inside your plugins directory but copy those files to your theme directory.
    https://codex.bbpress.org/theme-compatibility/

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