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 );
}
I solved this. The code above was already in the functions file. I removed it and all is well.
I’m having this error on my production website.
I added the code in my functions.php file of my child theme which causes the site to not load. With the exception that I changed the return value:
add_filter( 'bbp_verify_nonce_request_url', 'my_bbp_verify_nonce_request_url', 999, 1 );
function my_bbp_verify_nonce_request_url( $requested_url )
{
return 'http://www.ccghpa.com' . $_SERVER['REQUEST_URI'];
}
Any other fixes?
I appreciate your willingness to help. 🙂 It’s not functionality that I want to customize at this time. Right now, I’m only really interested in getting the pages to integrate/fit well with my site. That is, I need to integrate it with my theme.
Perhaps if we look at this from the other end the problem will be easier to understand:
My plan at present is to develop a new template page within my theme to handle bbPress Topic pages. This new page will adopt elements (mostly copy/paste style) from one of the bbPress files (plugin-bbpress.php, bbpress.php, forums.php, or forum.php). I’m confused as to which of those files should be used for displaying bbPress Topcic pages (e.g. sopearly.com/topic/welcome-to-the-sopearly-community/).
If I had to guess, I would start by copying & modifying forum.php into my new template. Would that be correct?
hmm.. The only way I can immediately think of is to modify loop-topics
so
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress
where %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-topics.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-topics.php
bbPress will now use this template instead of the original
and you can amend this
so in that file you will see
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
you would need to check with forum the user is in and then custom display
so something like – you’d need to write the code – this is just words !
<?php
if (forum == the one you want to change) {
then make an array of the ID, and then cycle through them
foreach ($topics as $topic) {
bbp_get_template_part( 'loop', 'single-topic' );
}
}
else { ?>
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
<?php } ?>
You are correct. There is no functionality missing, and I am trying to get the bbPress pages to look like they fit with the rest of my site (i.e. background and header–theme elements). My last reply (#176623) was badly mangled by the auto-populated page elements from my site (did not see that coming), and Akismet keeps blocking my posts, so I have no idea when anyone will see this. :”’ (
Please correct me if I am using the wrong approach, but what I am trying to do is figure out which of the files at wp-content/plugins/bbpress/templates/default/bbpress that I should be using to customize the bbPress topic page (e.g. ‘sopearly.com/topic/welcome-to-the-sopearly-community/’) and which file name I should rename it to: plugin-bbpress.php, bbpress.php, forums.php, forum.php.
I realize I’m having a lot of trouble with this. Thanks so much for your help. 🙂
it’s enough to send a prospective wordpress user running in the direction of other alternatives
bbPress has a forum import tool in Tools > Forums > Import Forums (free and open source code, so any dev can just improve the program how they want then official devs can commit changes or not).
Should point out, that the return at the bottom originally was like this:
return get_author_posts_url( $user->ID );
Hi Robin,
thanks for the quick reply. Unfortunately, the code did not work. When I enter text that I know is in a wordpress page into the forum search box, I get a list of forum topics, and that list disappears. When the list disappears, I get a no post found message.
https://www.dropbox.com/s/8xv3qblzumnh16s/forumsearch.PNG?dl=0
Thanks, Robin. I’ve already done that for the Forum Index and Forum pages. In concert with a few .htaccess redirects, it works fine, as can be seen here:
https://sopearly.com/forums/
https://sopearly.com/forum-introductions/
Any links to the bbPress-generated https://sopearly.com/forum/introductions/ are redirected to https://sopearly.com/forum-introductions/.
Redirect /forum/introductions/ https://sopearly.com/forum-introductions/
The biggest problem I am having right now is with the Topic pages, since I do not have control over which discussion topics be created by my users in each of the forums; the Topic page links are automatically generated by bbPress. Here is a good example:
https://sopearly.com/topic/welcome-to-the-sopearly-community/
I can make the colors, spacing, etc. match the rest of my site with a little work, but the page backgrounds and header are managed by the theme I’m using. What I’ve been able to gather by the reading I’ve done is that I should be able to take the contents of one of the files located at wp-content/plugins/bbpress/templates/default/bbpress, insert that into the appropriate (copied) theme file (single, template, etc.), and rename that file to one of the following:
- plugin-bbpress.php
- bbpress.php
- forums.php
- forum.php
I can get with my theme’s support to find out which of their files I should start with, but (unless you think there is a better way) I guess my question is which of the files from wp-content/plugins/bbpress/templates/default/bbpress should I use, and to which of the four filenames should I copy it in my child theme? Thanks so much for your help. 🙂
Sorry if my response was not good.
What i meant was, Your suggestion was together with a few adjustments i made to the code, which i used to get the alphabetically arrangement of a specific forum topic.
Now i want to arrange another specific forum topic in a specic order using there ID i guess.
For example, I want to arrange the following topic to another arrangement.
Topic ID
I enjoy bbpress 655
I want bbpress 658
I love bbpress 660
bbpress 662
To be arranged like this
Topic ID
I love bbpress 660
I want bbpress 658
bbpress 662
I enjoy bbpress 655
That’s what i want to do now, I was hoping you could help me.
Thanks for your time
Try adding this to your functions file:
function amend_bbpress_search ($args) {
$args[‘post_type’] = ‘any’ ;
return $args ;
}
add_filter (‘bbp_before_has_search_results_parse_args’ , ‘amend_bbpress_search’) ;
Functions files and child themes – explained !
it depends what you mean by integration.
In essence if you create a page in your site called say ‘forums’ and put the shortcode [bbp-forum-index] in it, then you have integrated it.
Let us know beyond that what you want, and we’ll try and help further
I’ve read a lot of the documentation and posts on this, but it unfortunately is not sinking into my skull. From what I can tell, there are basically three pages to the standard bbPress installation & usage: Forum Index page, Forum page, and Topic page. I saw something referring to the wp-content/plugins/bbpress/templates/default/bbpress folder, available after installing bbPress. How do I know which of these files to copy/modify, and to which file name should I copy it? Any help or insight you might be able to offer would be appreciated. I am completely lost on this.
The bbp_setup_current_user issue is not caused by bbPress, bbPress alerts you of this issue though because it is important for bbPress. If you have disabled ALL your plugins and the error remains you MUST switch the theme to Twenty Thirteen (or Twenty Fourteen, Fifteen, Sixteen etc).
Once you know what plugin or theme causes the issue then you can contact the author and let them know they need to fix it and problem solved.
I have tried searching, and haven’t found this issue. I may not be using proper terms.
The email notifications are being sent just fine. However, they all are proceeded by a bunch of characters, i.e. similar to the following (plus there are strange codes within the email itself)
=?UTF-8?Q?ly=20To:=20Safety=20in=20Chir?==?UTF-8?Q?iqui?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
The subject lines are fine. However, there are also lines of the notification showing extraneous codes and line breaks in strange places, including middle of a word, like the following:
A new reply has been posted by a user. Please login to read full p=
osting and respond.
IMPORTANT: You cannot reply to forum postings via email. You must be logged=
in to reply.=20
Lastly, the end of the excerpts show codes too, such as =E2=80=A6
Using latest version of WP and plugin.
if you’ve copied/pasted it from your code, then you have a space after ‘my_custom_display_topic_index_query and before the closing ‘ bracket
ie
‘my_custom_display_topic_index_query '
when it should be
‘my_custom_display_topic_index_query'
Hello everyone.
I have been issues with sorting my BBpress forum topic on the front end.
So i tried to use a custom function i got from one of the threads.
Here is the code i used.
//* Change sort order of Topics within a specified bbpress forum
function my_custom_display_topic_index_query ($args) {
$thisforumid = bbp_get_forum_id();
if($thisforumid == 43135) {
$args[‘orderby’] = ‘date’;
$args[‘order’] = ‘ASC’;
}
return $args;
}
add_filter(‘bbp_before_has_topics_parse_args’, ‘my_custom_display_topic_index_query ‘ );
and i got this error
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘my_custom_display_topic_index_query ‘ not found or invalid function name in /home/flexol5/public_html/wp-includes/plugin.php on line 235
Warning: array_merge(): Argument #2 is not an array in /home/flexol5/public_html/wp-content/plugins/bbpress/includes/common/functions.php on line 1419
I don’t know what i did wrong or maybe the coding structure of bbpress as changed. I would like someone to help with a way to arrange a specific forum topic in ascending order.
Thanks
For anyone that hasn’t solved this yet, it’s actually a very easy and quick fix!
In the W3 spec (http://www.w3.org/TR/dom/), the “insertBefore” method requires 2 arguments. The second can be null, but it is still required. It looks like IE doesn’t require the second argument (which is why it works in IE as is) while Chrome, Firefox, and Safari do.
bbpress/templates/default/js/reply.js – line 18
Added a null argument as the second argument on “insertBefore”.
Before Fix: reply.parentNode.insertBefore(respond);
After Fix: reply.parentNode.insertBefore(respond, null);
reply.parentNode.insertBefore(respond, null);
if ( post && postId )
post.value = postId;
parent.value = parentId;
cancel.style.display = '';
Firstly, you should use bbPress 2.6-alpha, it has a heap of importer improvements, you can get it from this page https://bbpress.org/download/
boards, log_notify, topics, messages, and members are the only SMF tables you need, these might also be prefixed with smf_, e.g. smf_boards
Use this to get rid of that silly Private prefix 🙂
https://gist.github.com/ntwb/8662354
p.s. We’ll get that removed from bbPress and/or WordPress proper one of these days ;P
Use bbPress’ “Private Forums”:
* Private – Only logged in registered users with a forum role can see these forums
Step by step guide to setting up a bbPress forum – Part 1
Excellent, glad that worked.
The full details and code for bbPress’ fix is here if that kind of thing interests you 🙂
https://bbpress.trac.wordpress.org/changeset/6061
I found this plugin that takes all the usernames that are commented on a post and makes the link go to a different page. I’m trying to make it call the bbp_user_profile_url. This way, when the link of a user is clicked on from the comments it goes to the users bbpress profile.
My PHP is a little rusty, so I deliberately coded this wrong hoping someone can see what I’m trying to accomplish. My code modifications are at the very end.