Hay. New here. I tried to create a theme from scracth using pure html php and etc
At first, it was normal. It functions normally and the UI is not as messed up as right now.
And now out of anything, it suddenly messed up. Checkout my website here if you wanna see it https://psikologipolda.com/konsul-online/
I tried uninstalling bbpress, tried using different way of calling the forums and it still doesn’t work. Try looking at the css and tweak it, still doesn’t change.
Any idea? or any place I should edit my code?
FYI the page only used:
the content.php (that is used as a template for any content including the forum)
and the custom template for that page only.php
put this in your theme’s custom css area
.bbp-author-ip {
display : none !important ;
}
It seems to be an issue finding all the replies. In the database all those posts have the type “reply” as post_type. I don’t get it. The link matches the format for forums and topics, which are able to find all the posts just fine.
…/wp-admin/edit.php?post_type=reply
In addition to this, all the reply post authors are being input as 0, which makes them anonymous. I have that unchecked in the settings.
Is there a way to permanently delete bbpress and all its contents so I can reinstall fresh? EDIT: I found the answer to this question. https://codex.bbpress.org/getting-started/installing-bbpress/deleting-bbpress/
bbp_has_forumms is just a forum version of wordpress has_posts.
The code you first posted – where is it, in your functions, in a plugin or where?
ok, given that I probably amswered your original Q too literally let’s re-phrase that –
bbpress requires you to have an account on your website that is hooked to the wordpress software running on your website – which is what my original answer was. The username, password and all other details are only held only on your website. Nothing is passed to any other site (unless you add code to do so).
You are not required to have a wordpress.org username to use bbpress
Sorry–I think there was a typo earlier. The shortcodes are here:https://codex.bbpress.org/features/shortcodes/
Shortcode for create new topic page: [bbp-topic-form]
for new topic specific to an id: [bbp-topic-form forum_id=$forum_id]
Hi There. I am new to bbpress, but I had a similar requirement, and I believe the following works:
1) Create a page where users can create a new topic. To do this, you can use one of these shortcodes: for new topic page: [bbp-topic-form]
for topic specific to forum id: [bbp-topic-form]
2) Put a link to this page in the menu. (so in your menu, have a “Create a New Topic” link that takes you to the new topic page).
Thanks, Robin W.
It’s a site I inherited with 100+ plugins. I’m trying to unravel the necessary from the superfluous but too many things keep breaking.
I’m trying to put traps in the code to see where conflicts are occurring. It seems like bbp_has_forums calls methods that call methods that call methods…
I would appreciate if someone could help shortcircuit this process and point me to the place where the actual test is happening.
Please forgive my snarky comment earlier. This site has been a cluster and I’ve been frustrated by a long list of plugins with no doc and no response to developers.
totally untested but try
function rew_status_transitions( $post ) {
if ( $post->post_type == 'reply') {
$topic = bbp_get_reply_topic_id ($post->ID) ;
//update the post meta
update_post_meta ($topic, '_bbp_last_active_time' , $post->post_date) ;
}
}
add_action( 'future_to_publish', 'rew_status_transitions', 10, 1 );
it’s not much of a codex, but it’s the only one there is! I wrote quite a lot if it when I started using bbpress – I’m just a bbpress user who helps on here. If you’d like to contribute, post suggested improvements and I’ll add them – just saying 🙂
So if your code was working a few days ago, and it now isn’t, then you must have upgraded the theme, a plugin or changed something else. Without knowing what it’s hard to help.
It’s working! Great!
1.New scheduled topic: time of publication and the timestamp in tracker coincide now!
2.Old topic (written 5 years ago) after time-correction for today – appear in the tracker correctly!
3.But, does not work for scheduled replay in topic. If replace the word “topic” for word “replay” in the code – will this work?
I have a bbPress forum integrated with WooCommerce.
Until a few days ago it was working fine, but now
$uid = bbp_get_current_user_id();
if ( bbp_has_forums( array(
'author' => $uid
)) ) :
returns bool(false) regardless of the user or user role.
On a side note, when searching codex.bbpress.org, the results I (don’t) get:
bbp_get_current_user_id – “Sorry, no posts matched your criteria.”
bbp_has_forums – “Sorry, no posts matched your criteria.”
bbp_forums – “Sorry, no posts matched your criteria.”
bbp_the_forum – “Sorry, no posts matched your criteria.”
I understand these are just wrappers for WP_Query, but there are some obviously also forum-specific options. It doesn’t seem like much of a codex. Just saying.
this is more complicated than it as first looks, as there is forum data that needs updating
but as a start
function rew_status_transitions( $post ) {
if ( $post->post_type == 'topic') {
//update the post meta
update_post_meta ($post->ID, '_bbp_last_active_time' , $post->post_date) ;
}
}
add_action( 'future_to_publish', 'rew_status_transitions', 10, 1 );
yes, apostrophes are okay now, with same result as before : links do not appear anymore in new topics. i disable the code, links display…
So strange this function is not in bbpresscore, I suppose many of us need it..
Anyway, thank you so much for your help and patience Robin. I spent much time on this without results. I think I’ll just lokk for another system than bbpress for my forum..
function custom_bbp_has_replies($args) {
$args[‘order’] = ‘DESC’; // 'ASC' (Ascending, Default), 'DESC' (Descending)
return $args;
}
needs the apostrophies sorting on it !!
here it is
function custom_bbp_has_replies($args) {
$args[‘order’] = ‘DESC’; // 'ASC' (Ascending, Default), 'DESC' (Descending)
return $args;
}
add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );
function custom_bbp_show_lead_topic( $show_lead ) {
$show_lead[] = 'true';
return $show_lead;
}
add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );
can you post the code you are now using
Thank you, Stephen, for sharing the examples link.Now i know where i was doing the mistake and after applying the code it work like anything.
Well, this thread is pretty old and I have a way how you can enable AMP for bbpress pages.
Before going to enable AMP support you need below things:
– Code snippets plugin
– AMP plugin
Create a new code snippet and add the following code:
add_action( ‘amp_init’, ‘amp_bbpress_init’ );
function amp_bbpress_init() {
add_post_type_support( ‘topic’, AMP_QUERY_VAR );
}
Read more @ How to Implement AMP on bbPress
@poonasor
function rew_check_forum_root () {
$forum_slug = '/'.bbp_get_root_slug().'/' ;
$page_slug = $_SERVER['REQUEST_URI'] ;
if ($page_slug == $forum_slug) return true ;
else return false ;
}
if (rew_check_forum_root() ) echo 'we are at the forum root!' ;
this should do it
function rew_check_forum_root () {
$forum_slug = '/'.bbp_get_root_slug().'/' ;
$page_slug = $_SERVER['REQUEST_URI'] ;
if ($page_slug == $forum_slug) return true ;
else return false ;
}
if (rew_check_forum_root() ) echo 'we are at the forum root!' ;
I’m pretty sue that you code is suffering from apostrophe differences.
When you copy code differ3ent editors change the ‘ !
so your code has for instance
(‘bbp_before_has_replies_parse_args’,
suggest you remove the start and end apostrophies and replace eg
('bbp_before_has_replies_parse_args',
here is all the code I have (line 614 to 626) :
function custom_bbp_has_replies($args) {
$args[‘order’] = ‘DESC’; // ‘ASC’ (Ascending, Default), ‘DESC’ (Descending)
return $args;
}
add_filter(‘bbp_before_has_replies_parse_args’, ‘custom_bbp_has_replies’ );
function custom_bbp_show_lead_topic( $show_lead ) {
$show_lead[] = ‘true’;
return $show_lead;
}
add_filter(‘bbp_show_lead_topic’, ‘custom_bbp_show_lead_topic’ );
The errors :
Notice: Use of undefined constant ‘custom_bbp_has_replies’ – assumed ‘‘custom_bbp_has_replies’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 619
Notice: Use of undefined constant ‘bbp_show_lead_topic’ – assumed ‘‘bbp_show_lead_topic’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 626
Notice: Use of undefined constant ‘custom_bbp_show_lead_topic’ – assumed ‘‘custom_bbp_show_lead_topic’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 626
In fact answers are not inverted anymore…
hmmm…
1. did you leave in the code, from what you say that is needed as well
function custom_bbp_show_lead_topic( $show_lead ) {
$show_lead[] = ‘true’;
return $show_lead;
}
add_filter(‘bbp_show_lead_topic’, ‘custom_bbp_show_lead_topic’ );
on your other errors, can you post lines from say 615-630 from your functions file
Hi Robin and thanks for your answer,
I tried with your code, and :
replies are inverted but I cannot see the Topic itself anymore, only answers
– I have this handful of mistakes appearing
f undefined constant ‘custom_bbp_has_replies’ – assumed ‘‘custom_bbp_has_replies’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 620
Notice: Use of undefined constant ‘bbp_before_has_replies_parse_args’ – assumed ‘‘bbp_before_has_replies_parse_args’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 621
Notice: Use of undefined constant ‘custom_bbp_has_replies’ – assumed ‘‘custom_bbp_has_replies’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 621
Notice: Use of undefined constant ‘bbp_show_lead_topic’ – assumed ‘‘bbp_show_lead_topic’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 628
Notice: Use of undefined constant ‘custom_bbp_show_lead_topic’ – assumed ‘‘custom_bbp_show_lead_topic’’ in /home/acania/public_html/demo/wp-content/themes/woffice-child-theme/functions.php on line 628
I am not a developper, so I do not know what to do with these