If I understand you correctly you want to amend a file in
wp-content/plugins/bbpress/templates/default/bbpress/
The easiest way is to copy the relevant file to your child theme
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress and copy the file there eg
wp-content/themes/%your-theme-name%/bbpress/loop-forums.php
bbPress will now use this template instead of the original
and you can amend this
You can also add a location – for instance within a plugin I use I add a location using :
add_action( 'bbp_register_theme_packages', 'bsp_register_plugin_template1' );
//get the template path
function bsp_get_template1_path() {
return BSP_PLUGIN_DIR . '/templates/templates1';
}
function bsp_register_plugin_template1() {
bbp_register_template_stack( 'bsp_get_template1_path', 12 );
}
Hi
It is specifically not to add a item into a theme folder as i want the plugin to be totally standalone. with no “Extra” edits required.
So adding the location can that work to add a location within the plugin to view templates etc.
so the template lcoation would be /wp-content/plugins/myplugin/templates/replacementbbpresstemplate.php
Will that work?
yes, the code I posted above if placed in your plugin would tell bbpress to look in
content/plugins/myplugin/templates/templates1/
FYI https://wordpress.org/plugins/eighties-bbpress/ is a fantastic example of overriding bbPress templates using a plugin 🙂