you can call the page using an html button
Just get the permalink for the new topic page (at the top of the dit screen for that page)
the where you want it put
<button type="button" onclick="window.location.href='http://www.mysite.com/page1'">Read More</button>
with the correct url
the code that profile uses is
<p class="bbp-user-topic-count"><?php printf( __( 'Topics Started: %s', 'bbpress' ), bbp_get_user_topic_count_raw() ); ?></p>
<p class="bbp-user-reply-count"><?php printf( __( 'Replies Created: %s', 'bbpress' ), bbp_get_user_reply_count_raw() ); ?></p>
The function is expecting the profile user to be in a variable called $user_id
Suggest you refer to the userpro support site for how to integrate this
This also doesn’t explain why this shortcode doesn’t work either http://ontariodoulas.org/forums/
[bbp-forum-index]
yes, i have done that, but with no result.
ok, first i created a new page and put the short code [bbp-single-forum id=105] as per my forum id and then changed the required parent page and published. thats it right?
hello,
i am using a plugin “user pro for social login”
with custom css the profile of bbpress is changed into user pro profile page, you can have a look at cahive.com/profile/siddardha
i want to insert the “topics and replies posted” by the user using shortcodes or any other method possible on the users profile page.
thank you for your help.
Depends what the issue is.
I suggest this approach as it helps define whether on a ‘clean’ default theme with no other plugins bbpress is experiencing issues.
If it is ok in a clean site, then I’d suggest talking to your host provider – most are good with wordpress, and may identify any issues.
If you can identify a conflict, then we can look at a solution, sometimes it is easy, often it might be harder 🙂
I presume your test site is on a local server?
If you’re ok/good with web stuff, then you might consider putting a test site on-line so that it is an exact match for the live environment, most host providers allow sub-domains and if you switch on discourage search then it doesn’t interfere see
https://codex.bbpress.org/creating-a-test-site/
then you can be happier that live will work.
Anyway just a thought !!
Hi and thanks for your reply but I have a parent theme and can not create a child theme.
Can I paste this code into a parent theme and if yes, at what function file?
There are plenty into the dashboard.There is bbpress-functions, there is theme functions, functionsbu.php. Can you pls specify? I would deeply appreciate this!
It worked Robin. The problem was with the stylish single quotes in the shortcode on the link, I copied it as it is in the site. I changed it to normal single quotes and it started working. Thank you so much for your help and for such an awesome plugin.
I just installed bbpress 2.5.4 on WordPress 4.1, on two different websites.
On my test site, everything is working as expected, but on my live site (which has SSL) every time I try to access the default https://mysite.com/forums/ I get the following error:
Fatal error: ob_end_flush(): Cannot use output buffering in output buffering display handlers in /homepages/wordpress/wp-includes/functions.php on line 3269
I can create a new page with a different name than “forums” and use the shortcode successfully, but the breadcrumbs have a direct link to the “/forums” and it gives the same error.
Any idea what may be going on?
Thanks!
Thanks for the tip! Problem solved 🙂
I also found this code to put in my custom functions.php to to solve this withouth the extra plugin.
function fix_auto_subscribe( $checked, $topic_subscribed ) {
if( $topic_subscribed == 0 )
$topic_subscribed = true;
return checked( $topic_subscribed, true, false );
}
add_filter( 'bbp_get_form_topic_subscribed', 'fix_auto_subscribe', 10, 2 );
And I also want to know whether these shortcodes work on a wordpress widget.
Thanks a lot Robin. I tried the shortcodes as mentioned in the above page after installing and activating the plugin. It did not work for me. I used putting respective forum ID as well. Can you kindly help me on this. I am stuck fixing this for a long time now.
Thanks for the info robin.
I have a small doubt, pls clarify.
So I will create a new page and paste the required short code and select the parent page, right? That’s all?
Thank you once more.
Thank you, I solved it.
#bbpress-forums div.odd,
#bbpress-forums ul.odd {
font-size:12px;
margin-top:0;
}
#bbpress-forums div.even,
#bbpress-forums ul.even {
font-size:12px;
margin-top:0;
}
Like many plugins the documentation is not great, and as a humble user I have added to it as I have learnt, a good deal of the documentation is mine.
bbpress is a complex plugin, and I sympathise that it is not great to grasp.
With templates, all functions are written to allow you to filter what is there, this is a standard wordpress/php process, so you’re sort of expected to know about it as part of wordpress! I did try to explain it in
Step by step guide to setting up a bbPress forum – part 5
you can filter many bbpress functions using ‘parse args’ capability – a standard wordpress technique or just filter the whole function, you’ll see a return apply_filters in all template functions and this is the hook that you use.
so for you you could us the code in your other post
Display the last topic updated in the forums loop
If you’d like to help with documentation, just find where something is poor and write what you think it needs changing to, it is newcomers like you that can really help improve what is there
just use shortcodes
https://codex.bbpress.org/shortcodes/
in particular
[bbp-single-forum id=$forum_id]
put this in your functions file
function rw_custom_freshness_link( $forum_id = 0 ) {
$forum_id = bbp_get_forum_id( $forum_id );
$active_id = bbp_get_forum_last_active_id( $forum_id );
$link_url = $title = '';
if ( empty( $active_id ) )
$active_id = bbp_get_forum_last_reply_id( $forum_id );
if ( empty( $active_id ) )
$active_id = bbp_get_forum_last_topic_id( $forum_id );
if ( bbp_is_topic( $active_id ) ) {
$link_url = bbp_get_forum_last_topic_permalink( $forum_id );
$title = bbp_get_forum_last_topic_title( $forum_id );
} elseif ( bbp_is_reply( $active_id ) ) {
$link_url = bbp_get_forum_last_reply_url( $forum_id );
$title = bbp_get_forum_last_reply_title( $forum_id );
}
$time_since = bbp_get_forum_last_active_time( $forum_id );
if ( !empty( $time_since ) && !empty( $link_url ) )
$anchor = '<a href="' . esc_url( $link_url ) . '" title="' . esc_attr( $title ) . '">' . esc_attr( $title ) . '</a>';
else
$anchor = esc_html__( 'No Topics', 'bbpress' );
return apply_filters( 'rw_get_forum_freshness_link', $anchor, $forum_id, $time_since, $link_url, $title, $active_id );
}
add_filter('bbp_get_forum_freshness_link', 'rw_custom_freshness_link' );
Functions files and child themes – explained !
I have tested bbpress forums in diffrent themes. In Techism and Colorway the “Latest post” and “Latest threads” display the users avatar in the widgets.
But now I am testing twenty twelve and there is no avatar showing in these widgets.
Please advice where to activate avatars in the widgets or where the CSS code for this is found.
Hi! So I’ve created a New Topic page using the shortcode but I can’t seem to figure out the code or where to place the code to add a New Topic button within the forums. I have stumbled across a plugin, but it costs a bit of money and I’d rather not pay for something that should come with the forum in the first place. Any chance someone could give me semi-detailed instructions of where to put a code, and what code to use? I’ve done some searching but can’t really figure it out.
Thanks
http://the-divine.net
It seems a few of my users when trying to log in or register an account are directed to a white screen that says “Blocked”. It seems to go away eventually, but this has been an on-going issue. I notice it happens when they try using the short-code pages I’ve made, but not so much on the meta links. I don’t seem to get this issue but I am getting many complaints. Also, it seems like this may be related to plugins as I removed certain ones after a complaint and it seemed to fix this issue for a bit, but now it’s back.
Any idea what’s going on?
My site: http://the-divine.net
@geekserve
did it work??
ill add it to the docs in a minute if it did
listing this kind of code and putting examples like this is a whole lot easier than talking about spam/security/seo in a doc article.
try this CSS
#bbpress-forums div.bbp-forum-author img.avatar,
#bbpress-forums div.bbp-topic-author img.avatar,
#bbpress-forums div.bbp-reply-author img.avatar {
border: none;
max-width: 130px;
padding: 0 0 10px 0;
margin: 12px auto 0 auto;
float: none;
}
Why has this not been documented anywhere?
That is probably my biggest problem with bbPress right now, documentation is non-existant. You’ve got to crawl through the plugin code to find what you’re after.
i had this kind of layout one day messing around with bbPress templates in my child theme.
i think its close to this but i havent tested it to make sure.
its without the permalinks though , i had permalinks before but right now i just breezing through the templates and trying to find them.
for the forum loop
<a href"<?php bbp_forum_last_topic_permalink(); ?>"><?php bbp_forum_last_topic_title(); ?></a>
for the topic loop
<a href"<?php bbp_topic_last_reply_permalink(); ?>"><?php bbp_topic_last_reply_title(); ?></a>
EDIT: added permalinks