Added this to my theme functions file:
// Adding function to block page content for any pages containing bbpress shortcodes.
add_filter(‘mepr-pre-run-rule-content’, ‘do_block_the_content’, 99, 3);
function do_block_the_content($block, $current_post, $uri) {
$block = 1;
return $block;
}
It seems to be doing what I want, but we’ll see.
I have added a forum page already. that is where i put this shortcode: [bbp-forum-index]
I have created a theme, and installed bbPress. I followed the getting started instructions in the documentation, and added the [bbp-forum-index] shortcode to my forum page.
Under my theme, no forum appears, nothing at all. However if I activate a default theme the forum shows.
How do I add a forum to a wordpress theme that i created? I couldn’t seem to find anything on the internet to help with that part.
Many thanks
WordPress 5.2.4
bbPress Version 2.6.2
I have the exact same issue.
Any page that has a bbpress forum shortcode on it, the memberpress login does not appear on it and the forum does, even if the user is not logged in.
so you will either need a hook from your CiviCRM code, so need to query this with them, or as you suggest have a cron job.
In the spirit of community software, if you write such a function, then yes please do share it here so that other people who would like to do this canb make use of it
Since the function still needed a return value I wrapped the actual for loop instead.
But I don’t know if it was coincidence or what but i site seemed more sluggish. I have commented that code out even though it worked. Maybe the check is done fairly frequently. I don’t know.
I will leave it for the moment as it is. Worse case scenario is that I switch off showing the last 24 hours activity as there is a setting for that.
ok, very quick as I am passing
If you just want it to display for logged in but not for others, then just change
return $HTMLOutput;
to
if (is_user_logged_in()) {
return $HTMLOutput;
}
It seems to be this html that builds a load of divs:
function build_html() {
$this->sort_users();
$data = $this->stats_builder();
$HTMLOutput = "";
foreach( $data as $key => $html ) {
$HTMLOutput .= "<div class='bbpas-" . $key . "' id='bbpas-" . $key . "'>" . $html . "</div>";
}
return $HTMLOutput;
}
That is called by this:
function widget( $arg, $instance ) {
echo $arg['before_widget'] .
$arg['before_title'] .
$instance['heading'] .
$arg['after_title'] .
$this->_parent->online->build_html() .
$arg['after_widget'];
}
So the is_logged_in test would have to be applied to build_html and if $key is a certain value do the logged in test.
Elsewhere i found this:
// Section: Users active in last x hours
if(in_array( 'last_x_hours', $stat ) ) {
$HTMLOutput["inactive"] = $this->section_userstats( $this->stats, "inactive" );
}
So I guess the $key of interest is inactive. Funny index to use for that …
Try a permanent fix to the code…
Make the fix to line #18 of reply.js (see https://bbpress.org/forums/topic/threaded-replies-not-working/)
All of a sudden, creating replies to replies started adding ‘_bbp_reply_to’ items to the ‘postmeta’ table, where that key has the value of the row to which the reply is being created.
Nested/indented replies suddenly started doing their thing; i.e., indenting to the level of reply-to-reply they are.
Specifically I am looking for some theme that works like is documented here: https://codex.bbpress.org/features/reply-threading/
Hierarchical replies do not use the post_parent column. Replies always use post_parent for the topic ID.
The hierarchy/relationship is instead determined using a piece of postmeta, similar to the topic and forum connections.
So when you say they aren’t working, are they really not working visually, or are they not working the way you expected them to?
We coded them this way, so that all post to post relationships could use the same mechanism, eventually allowing them to be swapped out for something even more performant later (taxonomy connections, or a custom database table.)
I only just noticed this. I don’t know if it is a bbp style pack issue as I am using that plugin for the style.
Look at this topic at the Favorite | Subscribe links:
https://www.dropbox.com/s/5b9zxi8xhf9sdpw/issue-ok.png?dl=0
They look fine. But when I have a topic which has a longer title:
https://www.dropbox.com/s/i26c3tsv1mtx56c/issue-not-ok.png?dl=0
Visually it is appearing as:
| Unsubscribe
Favorite
It should be:
Favorite |
Unsubscribe
Is this a bbPress 2.6.x issue or a bbp style pack issue.
Hy You can try this…
/* BBPress Fix Topic bbp-topic-form won’t show up properly on mobile */
@media (max-width:380px) and (min-width:320px) {
#bbpress-forums .bbp-the-content-wrapper,
#bbpress-forums #bbp_topic_title {
width: 100%;
}
}
Here is what I needed to do:
add_filter( ‘bbp_register_topic_post_type’, ‘enable_restAPI_bbpress_topics’, 10,1);
function enable_restAPI_bbpress_topics ($args) {
$args[‘show_in_rest’] = true;
$args[‘supports’] = array( ‘title’, ‘editor’, ‘author’ );
return $args;
}
Notice the supports variable. By including author that ensures post_author is set.
Seriously, BBPress should simply include a setting in backend to enable restAPI. That is the direction that the web is heading in already, with headless CMS, decoupling front and and backend.
Well, I am using your bbp style pack. Is it possible that some kind of vent hook had a priority change with the numbers in the source code which is not reflected in the style pack? Ie. Is it possible that in some instances hooks might not get executed? I recall the one instance where the number had been changed. This is only a hunch.
Andrew
phpBB version is 3 but not the newest version of it. I’m doing this for another person, who has custom code on the site and he said that he is unable to update the version.
The row amount. I get the same results with either 100 or 1000.
The problem is just that it doesnt recognize the forum folder to get the top parent forums. 2nd problem. The importer changes posts into replies and now every post is a reply.
I can create the problem now on my test site. If I add the plugin (which I was doing to de-bug) the problem goes away. This is despite it just being the code that the function uses !
I would like to eliminate that you posted to a closed topic.
I would however like you to look at this situation
Forum a – forum, open, public parent 0
Forum b – sub forum, public, parent forum a
Topic x – an OPEN topic
Reply 1 – a reply to the above topic
reply 2 – a second reply
can you get the problem with this set up and my plugin deactivated ?
So is there any way that I can provide for you the results for:
$ancestors = array_values( array_unique( array_merge( array( $topic_id, $forum_id ), (array) get_post_ancestors( $topic_id ) ) ) );
Or
foreach ( $ancestors as $ancestor )
?
This could be why? In your code:
// Reply meta relating to most recent reply
if ( bbp_is_reply( $ancestor ) ) {
// @todo - hierarchical replies
I had just made a most recent reply. So it is doing nothing. I dunno. You know the code better.
No, I’m deep in code, this is not simple !
In your case, If you move the private forum out from under a public forum, I suspect you will work.
Thanks for your quick response.
I have included this in my css file of the child theme.
# bbpress-forums li.bbp-body ul.forum .bbp-forum-title {
float: none! important;
}
Would it be a correct solution?
What is strange to me is that my theme includes this concrete for bbbress and that it breaks the site when it has always worked well.
Anyway, solved, thank you very much.
Looks like an issue with the CSS in the theme:
https://www.racingonlineclub.com/wp-content/themes/sportcenter/css/leaf-bbpress.css?ver=5.3
Line 741: float: left;
Remove the float, and everything snugs back up nicely, and the div below the title stops overlapping it.
I have read this topic:
Issues inserting/embedding videos
But when I insert the “bbpress shortcodes” there are two problems:
1/ The new setting does not show on my TinyMCE Advanced toolbar
2/ Going to their support forum results in an invalid domain
According to TinyMCE the [video] shortcode it support to render as a video. But when I paste it I just get the text. Now, I tried adding the functions.php to return video(...) but I got the same error for video being unknown.
So I am abit stuck.
I was hoping to use the dedicated TinyMCE “Video” but that only works for admin and I have no solution about the frustrating escaping of the chevrons. Thus I am looking at this video shortcode as an alternative.
Hi community, I have a problem with bbpress
After the upgrade to bbpress 2.6.2 the links of the titles of both topics and forums do not work.
For example in: https://www.racingonlineclub.com/foros/
The first title don’t link to forum “Ayuda y preguntas Frecuentes”
Instead the html code seems correct in the inspector
<a class="bbp-forum-title" href="https://www.racingonlineclub.com/foros/foro/ayuda-y-preguntas-frecuentes/">Ayuda y preguntas frecuentes</a>
Thanks for your help and regards.