Search Results for 'code'
-
AuthorSearch Results
-
February 26, 2016 at 5:08 pm #172256
Topic: Yet another sidebar issue
in forum Troubleshootingdgalfano
ParticipantYes, I’ve searched and came across numerous similar problems about the sidebar not displaying on the forum pages. Yes, I read through the canned responses to review this page: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/.
We’re using the Bridge theme and I’ve made sure the forums page is using the page.php template, AND the <?php get_sidebar();?> IS in the code. So why is the forum index showing full-width and not showing my bbPress sidebar?
Looking at source code of the rendered page does not show the sidebar though.
February 26, 2016 at 4:51 pm #172253thinkDrew
ParticipantThanks for the reply!
This is actually something I did before posting here (should have mentioned it) and while running the default 2015 theme, I am running into the same issue. This is the URL
/forums/search/french+fries/that is returning in the browser instead of the normal/?s=french+friesperam.It’s strange as I have several other corporate wordpress sites running (not w/ bbpress) but have never had a problem with “out of the box” search widgets :)…
I will continue to test (only running 4 plugins) and see what comes from that.
February 26, 2016 at 4:05 pm #172248In reply to: New topic area on forum not showing up
Robkk
ModeratorThis is the CSS causing the issue. This is found in a custom css plugin or a custom stylesheet from your theme.
#bbpress-forums fieldset.bbp-form p, #bbpress-forums fieldset.bbp-form textarea, #bbpress-forums fieldset.bbp-form select, #bbpress-forums fieldset.bbp-form input, #bbpress-forums fieldset.bbp-form .buddyboss-select { display: none; }February 26, 2016 at 2:37 pm #172244In reply to: bbp_new_forum hook
fterra
ParticipantHi, antipole,
I’m trying to do the same, subscribe all users to new forums and to new topics also.
I’ve been working on it for a while, mainly figuring out how bbPress itself works.
In the case you want to run something when someone creates a new forum from the admin page, my bet is you will want to hook tobbp_forum_attributes_metabox_saveaction, whose argument is $forum_id.
Hope it helps.February 26, 2016 at 1:49 pm #172240In reply to: BBPress not working with Optimizepress Theme
Robkk
ModeratorSee if this plugin fixes the issue you might be experiencing.
https://github.com/OptimizePress/op-bbpress-fix
The plugin seems to only contain a really small code snippet in it, so if you want to instead paste this code snippet instead you can also try that.
Add this function to your child themes (if you have a child theme) functions.php file, or add the php code snippet into a plugin that can hold custom php code snippets like the functionality plugin.
function op_allow_bbforum() { $forumPage = get_post(url_to_postid( "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] )); if ($forumPage->post_type == 'forum'){ op_update_option('blog_enabled','Y'); op_update_option('installed','Y'); } } add_action('init', 'op_allow_bbforum');Make sure to test and see if this plugin/code snippet works for all of bbPress’ post types.
February 26, 2016 at 12:11 pm #172232_az_
ParticipantI think #2258 is pretty complex to implement but possible. Might take some days to do it i guess.
Here is my workaround:
in functions.php:
/** * for nicer permalinks: * * from: forums/forum/name -> to forum/name * * also required rewrite rules below in myThemeName_addRewriteRules */ function myThemeName_bbp_get_forum_permalink_withoutRootSlug() { return preg_replace( '/(' . bbp_get_root_slug() . '\/)/', '', bbp_get_forum_permalink()); } function myThemeName_addRewriteRules() { /** * add rewrite rules for bbpress */ // use this to test instead of clicking Save Changes in Settings -> Permalinks // global $wp_rewrite; // $wp_rewrite->flush_rules(); add_rewrite_endpoint(get_option('_bbp_forum_slug'), EP_ROOT); add_rewrite_rule('^'. get_option('_bbp_forum_slug') . '/(.*)?','index.php?post_type=forum&name=$matches[1]'); } add_action('init', 'myThemeName_addRewriteRules');Replacement in my custom loop-single-forum.php:
<a href="<?php echo myThemeName_bbp_get_forum_permalink_withoutRootSlug(); ?>">Default bbpress templates use it at more places than my theme:
Found 5 matches of bbp_(get_)?forum_permalink in 4 files. loop-search-forum.php <a href="<?php bbp_forum_permalink(); ?>" class="bbp-forum-permalink">#<?php bbp_forum_id(); ?></a> [position 18:18] <h3><?php _e( 'Forum: ', 'bbpress' ); ?><a href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a></h3> [position 26:58] loop-search-topic.php <a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_forum_title( bbp_get_topic_forum_id() ); ?></a> [position 41:19] loop-single-forum.php <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a> [position 32:42] loop-single-topic.php <span class="bbp-topic-started-in"><?php printf( __( 'in: <a href="%1$s">%2$s</a>', 'bbpress' ), bbp_get_forum_permalink( bbp_get_topic_forum_id() ), bbp_get_forum_title( bbp_get_topic_forum_id() ) ); ?></span> [position 68:102]Feel free to hit the Flattr Button on my page: az.zankapfel.org
Update: Seems that the breadcrumbs need a hack too… 🙂
February 26, 2016 at 5:49 am #172226erlendglommen
ParticipantHi,
How can I create a similar sidebar as is shown in the bbPress Support page (this page)? I really like the forum list (which I know I can create with the standard widget), but I can’t find how to create the extra #Posts column that displays the number of posts within each forum.
And how do you add the pin icons in the “Views” sidebar?
Within each forum there is also a really nice “Forum info” sidebar with #-of-topics, #-of-replies, last-post-by etc. Are these created with shortcode within a text-widget? And there are nice icons displayed here as well.
It all looks really nice and clean and I would like to replicate it.
All the best
ErlendFebruary 26, 2016 at 5:06 am #172225In reply to: What do I do?
Robin W
Moderatorall themes allow a child theme – it is a wordpress thing not a theme thing. They won’t ‘support’ as in give you free help to set up and run.
see
https://codex.bbpress.org/functions-files-and-child-themes-explained/
As Pascal says, we can help with specific queries, but not in a full set-up. But googling around will fix a lot of what you’re asking.
February 25, 2016 at 5:52 pm #172222In reply to: bbp-form style
mulaps
Participanthttp://codepen.io/anon/pen/XdrBJq?editors=0100#0
The main.cssFebruary 25, 2016 at 8:08 am #172204Topic: bbp-form style
in forum Themesmulaps
ParticipantHi.
Im using motoblog theme from wolfthemes. After installing bbPress forum plugin i had issue with content wrapper. In the custom css section added fief lines:#bbpress-forums { width: 92%; max-width: 1140px; margin: 0 auto 30px; }But i still have the problem with
bbp-forumsection image: http://imgur.com/2cGasYv
Can someone please help me with this problem? I zoomed out page to create image.February 25, 2016 at 6:24 am #172201blux78
ParticipantHi everyone,
I’m trying to accomplish the exact same thing hoborob was doing here above.
Does anyone have a clear answer on this one, where to put what code in which file? Have searched the web extensively and found several solutions which come close, but not quite right yet.
Thanks in advance for your time and help!
Kind regards, blux78
February 25, 2016 at 5:47 am #172195In reply to: add a "Featured Image" to a forum
Pascal Casier
ModeratorHi,
Just want to add that, for the people that do not want to code this, the functionality is also in the ‘bbP Toolkit’ plugin.
Pascal.February 25, 2016 at 5:33 am #172192In reply to: What do I do?
Pascal Casier
ModeratorHi John,
We are all very much eager to help each other, but this forum runs on volunteers so we cannot just help you setting up your forum completely for you. You can however find people that do this for a living and pay them.Reading your above description I’m hesitating between ‘where is the question?’ and ‘There are 20 questions in 1 topic here’. So if you have any specific question, feel free to ask and if we can respond, we will.
Trying to answer some parts and giving thoughts:
– Not support child themes ? Then switch theme !
– You can always put extra code in the functions.php of you theme, but after a theme upgrade make sure to check your updates are still there
– For the login/redirect you are already on 2/3 other threads in this forum, please try to not repeat yourself in hereSo, for any specific question… shoot !
Pascal.
February 25, 2016 at 5:18 am #172190In reply to: Prompt forum role dropdown for user creation
Pascal Casier
ModeratorHi,
If you are on the/wp-admin/users.phppage, you can select one or more users and then use the dropdown box on top that says ‘Change forum role to…’ and hit the ‘Change’ button next to it.If you edit a specific user on
/wp-admin/user-edit.php?user_id=1234you should find a ‘Forums’ section and a dropdown where you can set the forum role.Of course you can never change it on your OWN profile.
Pascal.
February 25, 2016 at 12:30 am #172179In reply to: add a "Featured Image" to a forum
Tenebral
ParticipantThank you @netweb .
I just added the permalink, title and change the size from thumbnail to 80×80:
add_action( 'widgets_init', 'rkk_widgets_init' ); add_post_type_support('forum', array('thumbnail')); function ks_forum_icons() { if ( 'forum' == get_post_type() ) { global $post; if ( has_post_thumbnail($post->ID) ) echo '<a href="' . get_permalink( $_post->ID ) . '" title="' . get_the_title( $_post->ID ) . '">'; echo get_the_post_thumbnail($post->ID,array(80,80),array('class' => 'alignleft forum-icon')); echo '</a>'; } } add_action('bbp_theme_before_forum_title','ks_forum_icons');🙂
February 24, 2016 at 8:18 pm #172176In reply to: How to noindex member pages?
bimmerime
ParticipantWhere does that code goes exactly?!! also wouldn’t you want to nonindex the “users subscriptions”, “favorites”, and “topics started” as well ??
February 24, 2016 at 6:27 pm #172173siparker
Participantyep. its a shame no one seems to be interested
even with payment for the cause ? i suppose we need to try and find a freelancer who can submit to the core code after making a plugin perhaps?February 24, 2016 at 3:55 pm #172165In reply to: bbp_get_user_topics_started
chackem
ParticipantI have looked at the function. I even found it in the source code (which of course is the same as above).
I’m just curious why I’m not getting an array back, as the source code says:
(array|bool) bbp_get_user_topics_started( $user_id = 0 );
When I send it 1 for user_id, which I know has created 2 topics, (and those topics are shown on the bbpress profile page), I can only get an boolean back. Is there something I need to do to get an array of topics a user started other than this? Am I using the function wrong?
Sorry. Still confused.
Thanks.
February 24, 2016 at 11:27 am #172148In reply to: Setup login for private forum?
February 24, 2016 at 11:22 am #172146In reply to: Setup login for private forum?
Pascal Casier
ModeratorStep 5 of https://codex.bbpress.org/themes/theme-compatibility/step-by-step-guide-to-creating-a-custom-bbpress-theme/ is what you need…
Pascal.
February 24, 2016 at 11:16 am #172142In reply to: Redirect after registration – need new solution
Pascal Casier
ModeratorThen use the registration_redirect: https://codex.wordpress.org/Plugin_API/Filter_Reference/registration_redirect
Pascal.
February 24, 2016 at 9:55 am #172131In reply to: Redirect after registration – need new solution
wselwood
ParticipantThanks Pascal – I’m assuming the best code is:
function login_redirect( $redirect_to, $request, $user ){
return home_url(‘forums’);
}
add_filter( ‘login_redirect’, ‘login_redirect’, 10, 3 );But to use registration (or register) instead of login?
February 24, 2016 at 9:41 am #172130In reply to: Redirect after registration – need new solution
Pascal Casier
ModeratorI’ve pasted code into functions.php files, almost anywhere I can
There is only 1 (one) functions.php where you should paste it and that’s the one in your (child) theme.
all the solutions offered take me nowhere
I have put all the code that I have on https://bbpress.org/forums/topic/setup-login-for-private-forum/. If you only go for the code, then make sure to deactivate any other redirection and/or security plugins (at least for the test).
the site is at tec.selwood.me
You are missing the ‘Email’ label under the forgot your passsword on the log-in page
Pascal.
February 24, 2016 at 9:28 am #172129Topic: Redirect after registration – need new solution
in forum Troubleshootingwselwood
ParticipantOk, so I’m setting up my new bbPress forum and have come across a problem that I just can’t fix. It’s the redirection to the wp-login screen after registration. I’ve scoured these forums and all the solutions offered take me nowhere. I’ve installed 3rd party plugins (like Pete’s) but there is just no changing the redirect. I’ve pasted code into functions.php files, almost anywhere I can, but all it’s doing is going back to the damn wp-login page!
I am going insane here trying to make this work.
Latest WP version, latest Lincoln Education WP theme, latest bbPress version and the site is at tec.selwood.me
February 24, 2016 at 8:51 am #172125Topic: best rated forum post display
in forum PluginsRonald Mutsikwi
ParticipantHow can i display best rated forum post on my forum
and recent replies post, any plugin or code to do this… thanks in advance for help -
AuthorSearch Results