Herve ARNAUD (@herve-arnaud)

Forum Replies Created

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

  • Herve ARNAUD
    Participant

    @herve-arnaud

    Happy to see that bbPress team start to think about fixing this HUGE problem… which makes bbPress almost useless if you’re a bit concerned by the experience you provide to your users, by the crawling and indexation problematic, by the semantic architecture of your website and by the search engine optimization.

    This fix could be a “game changer”.

    I don’t have abilities for helping the community on that part, but I deeply encourage everyone who take this challenge.


    Herve ARNAUD
    Participant

    @herve-arnaud

    Late for @freshwater … Hope it will be usefull for someone else.

    To add and control the featured image size on forums:

    1- Add the following code to your child theme functions.php file.

    add_post_type_support('forum', array('thumbnail'));
    add_image_size('forum-category-thumbnail', 1080, 320, true);

    2- (optional) Change/rename “forum-category-thumbnail” by something more useful for you if you need.

    3- Set featured image size by changing numbers. First number is width in pixels and last is the height.

    4- (if not done yet) Create a bbpress directory in your child theme.

    5- (if not done yet) Copy the template file you want to affect from …/plugins/bbpress/template/defaut/bbpress/your_template.php to your bbpress directory.
    for example: content-single-forum.php

    6- Add the following code exactly where you want that your featured image appears in your template.

    <?php if( has_post_thumbnail() ): ?>
      <div class="entry-thumbnail"><?php the_post_thumbnail('forum-category-thumbnail') ?></div>
    <?php endif; ?>

    If you made change on point N°2 remember to change “forum-category-thumbnail” by what you’ve choose.

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