manifest / integrations / wpadverts-bbpress
WPAdverts bbPress Integration
Quick WPAdverts bbPress Integration
★ 1stars
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/devrix/wpadverts-bbpress/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Quick WPAdverts bbPress Integration
This simple addon will let you add the following to your bbPress forums:
- Register a custom profile tab at
/portfolioto show the user's adverts - Add a link to the adverts page for each user under avatar and author details in the forums
- Display 1 random advert below each topic, for the topic author.
All you need to do is activate the plugin and it will do the job. it does not come with a GUI for settings in case you were confused, but extending its features is quite easy.
Change advert limit below topic from 1 to more
add_filter('wabbp_parse_topic_adverts_parse_query', function($args){
$args['posts_per_page'] = 5; // changed from 1 to 5
return $args;
});
Disable the bbPress profile tab
add_filter('wpadvbbp', function($args){
unset($args['profile-tab']);
return $args;
});
Adjust the link to portfolio
add_filter('wabbp_link_to_bbp_tab', function($link, $user_id){
// point it out to example.com/samuel/adverts/
return home_url( get_userdata($user_id)->user_nicename . '/portfolio/' );
}, 10, 2);
Change the "Portfolio (%d)" link text
add_filter('wpadvbbp_menu_item_text', function() {
return 'My Portfolio (%d)'; // or 'My Portfolio' without count
});