Skip to content

Instantly share code, notes, and snippets.

@contemplate
Created August 9, 2022 12:13
Show Gist options
  • Select an option

  • Save contemplate/3fbca0d2b0f294a9b977d06ecf1820e8 to your computer and use it in GitHub Desktop.

Select an option

Save contemplate/3fbca0d2b0f294a9b977d06ecf1820e8 to your computer and use it in GitHub Desktop.
BUDDYBOSS ELEMENTOR FORUMS WIDGET LABEL HACK
<?php
// Add Forum Stickers
if( !empty( bbp_get_topic_forum_title()) ) { ?>
<span class="color bs-meta-item <?php echo ( bbp_is_single_forum() ) ? esc_attr( 'no-action' ) : ''; ?>" style="background: <?php echo color2rgba( textToColor( bbp_get_topic_forum_title() ), 0.6 ); ?>">
<?php if ( bbp_is_single_forum() ) {
?> <span class="no-links"><?php echo bbp_get_topic_forum_title(); ?></span> <?php
} else {
?> <a href="<?php echo esc_url( bbp_get_forum_permalink( bbp_get_topic_forum_id() ) ); ?>"><?php echo bbp_get_topic_forum_title(); ?></a>
<?php } ?>
</span>
<?php }
//END Forum Stickers
?>
@contemplate
Copy link
Copy Markdown
Author

contemplate commented Aug 9, 2022

BUDDYBOSS ELEMENTOR FORUMS WIDGET HACK:
/buddyboss-theme/inc/plugins/elementor/widgets/bb-forums.php

Adds forum sticker to latest forum discussion.

<?php endif; ?>
</span>

Add code after line 580 ( may change with plugin updates)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment