Skip Navigation

[Resolved] Extending bbPress features and layout with Toolset

This thread is resolved. Here is a description of the problem and solution.

Problem:

Manage Forum and Topic custom post types (CPT) with Access, meaning to define custom roles (CR) in Access and customize them: allow / deny to create / edit / update / delete bbPress Forums and / or Topics

Solution:

You can get User Roles and Capabilities from BBpress document:

https://codex.bbpress.org/getting-started/before-installing/bbpress-user-roles-and-capabilities/

And follow our document to add above Capabilities to your custom role:

https://toolset.com/documentation/user-guides/access-control/managing-wordpress-admin-capabilities-access/#standard-wordpress-user-roles-and-the-ones-created-by-other-plugins

section "Standard WordPress user roles and the ones created by other plugins"

Relevant Documentation:

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Author
Posts
#1444621

Hi,

I see there are older threads regarding bbPress - Toolset integration, but I suppose there might be recent changes / updates compared to them.

So I'd like:
- to manage Forum and Topic custom post types (CPT) with Access, meaning to define custom roles (CR) in Access and customize them: allow / deny to create / edit / update / delete bbPress Forums and / or Topics
- add custom fields (CF) and custom taxonomies (CT) to Forums and Topics,
being able to enter / assign them on the specific forum or topic page and
use them in custom Views ( non-bbPress default lists of Forums and / or Topics, pre-filtered and filterable-by-user by CFs and/or CTs )

So can I do them?
Do you have such a reference site? ( AFAIK you don't )

Thank you!

#1445831

Hello,

Q1) to manage Forum and Topic custom post types (CPT) with Access, meaning to define custom roles (CR) in Access and customize them: allow / deny to create / edit / update / delete bbPress Forums and / or Topics

You can get User Roles and Capabilities from BBpress document:
hidden link
And follow our document to add above Capabilities to your custom role:
https://toolset.com/documentation/user-guides/access-control/managing-wordpress-admin-capabilities-access/#standard-wordpress-user-roles-and-the-ones-created-by-other-plugins
section "Standard WordPress user roles and the ones created by other plugins"

Q2) add custom fields (CF) and custom taxonomies (CT) to Forums and Topics, being able to enter / assign them on the specific forum or topic page and
use them in custom Views ( non-bbPress default lists of Forums and / or Topics, pre-filtered and filterable-by-user by CFs and/or CTs )

You can add custom fields (CF) and custom taxonomies (CT) to Forums and Topics, but in your case, it needs to include those custom fields/taxonomies into the BBpress forms for creating/editing/displaying topic and forum, there isn't such kind of built-in feature within Toolset plugins, it needs custom codes, I have searched them in google, and found some related posts, for example:
hidden link
hidden link

According to our support policy, we don't provide custom codes support, you can check it with our Toolset contractor:
https://toolset.com/contractors/

#1446151

Hi,

- re Q1: it sounds good, thank you.

- re Q2: on Toolset / Dashboard I see I can create a content template for both (forum) Topics and Replies.
I created them in Block Editor without any issue, and could set up properly, so I could add all additional Topic related CFs and CT I wanted.
I enabled this content template for both Single and Archive of Topic CPT.
But it still uses the old bbPress Topic template, even if I try it with my selected theme or with 2020.
I think it still uses default bbPress Topic template, so the settings in Toolset doesn't override bbPress' ones.

I think I should copy and maybe rename 1 or a couple of files, but I can't figure out where this Toolset content template is stored and what is its name?

I found some useful-looking results by googling
override bbpress default topic template
so I can do / test that bbPress side if I know what to copy and rename.

Thank you

#1447981

The BBpress plugin is using custom function to render the contents of single topic post and archive topic page, but Toolset content template render the content within area of standard WordPress function the_content()
https://developer.wordpress.org/reference/functions/the_content/

So the Toolset content template won't work in both Single and Archive of Topic CPT.
For example, you can edit the BBpress plugin file \plugins\bbpress\templates\default\bbpress\content-single-topic.php

Add a below codes into above file:

<?php the_content(); ?>

You should be able to see the content template is render insider above codes.

I suggest you try to follow BBpress document to setup a child theme:
hidden link
And follow our document to display the content template:
https://toolset.com/documentation/user-guides/templates/theme-support-for-content-templates/

#1448295

I ask it more simpler:
where (in which Toolset folder, file(s) do I find the CPT template(s)?
When I say template, I mean PHP template of the CPT (single or archive) and not Toolset content template.
They are clearly not in theme roots, where in the most basic scenario should be.
I look for files like:
single-cpt.php
archive-cpt.php
or their equivalent.

#1448389

OK, I answer it in simple, since we are talking about BBpress plugin, this plugin is using his own template files for displaying single topic post and topic archive page, please have a look at the document I mentioned above:
hidden link

Step 6: Copy the Default bbPress Theme to Your Child Theme Folder

In BBpress plugin folder:
There is a folder called default at bbpress > templates > default

There you can find BBpress template files.

#1448459

OK, I try another way 🙂
Where (in which PHP file, with path) Toolset stores that Toolset content template, what I could create for bbP Topic CPT, if I'd click on
Toolset / Dashboard / Topic / Template,
where by default single.php is found.
Also, where (in which file) Toolset registers new CPTs?

In a basic scenario, when both single.php and single-cpt.php is stored in theme root, and I know the file where CPT registration happened, I've already made adjustments ( created / cloned CPTs, added more parameters and/ or set their value in PHP code), but in my case neither theme, nor bbPress nor Toolset uses that scenario, so I ask Toolset support how Toolset does it? (only the Toolset part I ask)

I might lost focus, so I brief what I want:
- I'd like to extend bbPress Topics by adding (with Toolset) a parent CPT (PCPT; with Relationship), and use some of the PCPT custom field (CF) values and some new CCPT CFs created for Topic, for advanced filtering them, the Topics.
I suppose I can do this filtered and further filterable list of Topics with some Views Views, where I would basically pre-filter Topics by parent CF and allow users to filter himself by CCPT CFs
- beside I want to keep and use bbPress' existing features ( moderation, triggered emails, reactions etc.),
but I'm afraid if I'd create a brand new Toolset content template (single) for Topics and add the bbPress default data dynamically with Toolset
(Topic Title, Topic Content, Date, Author, etc.) I might lose some bbPress functionality.

So I think I can not use default bbP templates, but I should use Toolset content templates (single), which are based on bbPress Topic template, but extended with some additional data ( by Toolset),
and instead of bbP Topic archive template I should use an extended version, which might be a View and must contain all of the bbP archive template'code and inserted and used in Views.

So now if I check Toolset / Dashboard, in the grid at Topics / Template I see:
"There is no Content Template for Topics items."
If I check default WP Posts, I see:
"single.php"
I think in Topics / Template I should seee something like:
"single-topics.php"
or such a bbP name which should be the default bbP Topic template, and that's what I should extend with Toolset's Block Editor, adding some more Blocks of Fields - if I'm not totally wrong...

I don't think simply adding bbP folder to child theme's folder will pass the info to Toolset that there is the template of the Topic (both single and archive), but i might be totally wrong again... : -/

#1450247

Toolset Content templates are saved in your database, and Views/Blocks plugin is using WordPress filter the_content to render the content template. Toolset Content templates are not template files

As I mentioned above, since we are talking about BBpress plugin, so you will need to(required) follow their document to setup the template files, if you don't want to follow their document, instead of "single-topics.php" file, then it will involve a lots of custom codes, you need to build theme files manually.

#1450343

OK, I may give the method you described a try,
or I drop bbPress completely and recreate their entities like Forums and Topics from scratch in Toolset and
accept the loss of some nice-to-have forum features.

Thank you for your detailed help!