Quantcast
Channel: bbPress.org » All Posts
Viewing all articles
Browse latest Browse all 3638

Reply To: correct way to override bbpress templates

$
0
0

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 );
}

Viewing all articles
Browse latest Browse all 3638

Trending Articles