I want to include a forum functionality to a new Toolset based site (groothartgroep.nl). I'm currently investigating bbPress for that purpose. However, I can't get bbPress to use Toolset templates. According to this 4-year old support item, this attempt is in vane as bbPress and similar solutions have hardcoded templates that cannot be overridden by Toolset.
My questions:
- is this indeed still the case?
- is there another route I could take with bbPress? (for instance building a template with bbPress shortcodes)?
- is there another forum solution, instead of bbPress, that IS compatible with Toolset?
- any other suggestion to approach this?
Kind regards, Joost
Hi there,
There is no integration between Toolset and a forum plugin. But I may be able to help if you give a specific use-case. For example why you want a Toolset template inside a bbPress forum?
Maybe if you give more context I can provide more information.
In general, the Toolset templates are stand alone templates and you can not mix them with other plugins.
But if you find the template code of bbPress, you can override that file to your theme and then use Toolset shortcodes in PHP to add additional info if you want.
https://developer.wordpress.org/reference/functions/do_shortcode/
Thanks.
Hi Christopher,
I want to achieve two things:
1) get the styling of the bbPress pages in line with the rest of the site
2) add some basic elements to bbPress pages: an image and some text
On other sites have been able to do this with Toolset for some plugins: Events Manager and LearnDash. They use a Toolset template when instructed so Content Template widget on WP backend. bbPress just ignores that. I agree that the use of the template in my examples is limited to styling. The actual content of a page managed by the plugins. So, apparently one can use Toolset templates for some plugins, but not for all. Hence, my question if there would be other suitable plugins.
I guess I'll have to do the styling separately with dedicated CSS. The extra elements will require diving in the template code.
Hi there,
I see what you mean. It is indeed something that you need to consider doing with CSS as Toolset does not have any control over the fact that a plugin accepts the Toolset Template or not.
For the additional element you can add it as a custom field and use hooks to add on bbPress if you do not want to override the default template of that plugin.
You can search for it here:
hidden link
So the code will be something like this:
function display_bbpress_custom_field() {
// Use do_shortcode to execute the Toolset Types shortcode and retrieve the custom field
echo do_shortcode('[types field="bbpress_image"][/types]');
}
// Add the custom field display to a bbPress hook
add_action('bbp_template_before_single_forum', 'display_bbpress_custom_field');
I did not test the code above, it is just to give you an idea on how to add additional elements inside a template of bbPress without needing to override the whole template file.
You can add custom codes inside Toolset settings:
https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/
Thanks,