Search Results for 'code'
-
AuthorSearch Results
-
February 25, 2016 at 12:30 am #172179
In 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 helpFebruary 24, 2016 at 3:34 am #172111In reply to: change forum role names to image
RLsARc
ParticipantFebruary 23, 2016 at 6:32 pm #172105In reply to: Hiding Sub-parents
Robin W
ModeratorOk, you need to amend some templates and put these into your child theme
https://codex.bbpress.org/functions-files-and-child-themes-explained/
Sub-forum removal
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.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-single-forum.php
bbPress will now use this template instead of the original
and you can amend this to remove the sub forumsline 44 says
<?php bbp_list_forums(); ?>delete this line and the sub forums will go !
forum posts
do the same as above, but for content-single-forum
and then take out line 26 that says
<?php bbp_single_forum_description(); ?>February 23, 2016 at 5:55 pm #172100In reply to: Hiding wp from forum subscribers
Robin W
Moderatorhttps://en-gb.wordpress.org/plugins/global-admin-bar-hide-or-remove/
or if you know code
add_filter('show_admin_bar', '__return_false');February 23, 2016 at 8:55 am #172087In reply to: Anyway to auto-populate a forum structure?
_az_
ParticipantThanks for pointing that out. I think i should make more use of
bbp_parse_args().bbp_create_initial_content()seems to be a good idea for deploying initial content, but i needed something more flexible, which can be used in the Dashboard. E.g. for deploying a default structure, given in said JSON File to a newly created Forum.February 23, 2016 at 8:55 am #172086In reply to: where to put bbpress.css in child-theme
Robin W
ModeratorThe code isn’t better, but I wanted to be sure that code itself wasn’t an issue. obviously posting the exact code works, although it doesn’t preform what you wish.
So back to the gallery plugin author for his help
I don’t know what giving throttle capability does the dics only discuss the setting
Throttle posting every
Set this to the minimum time (in seconds) between posting new replies in bbPress forums. This is useful to help stop spamming or other attempts to interrupt the normal flow of the forum.February 23, 2016 at 7:48 am #172085In reply to: where to put bbpress.css in child-theme
awal16
ParticipantI copied and paste the code again, and now I don’t get the warnings. So, why is this code better :)?
Besides, what does throttle mean, in the capabilitie?
February 23, 2016 at 4:29 am #172081In reply to: where to put bbpress.css in child-theme
Robin W
Moderatorso did you copy/paste it – exactly as per my code and what exact errors did you get?
February 23, 2016 at 2:47 am #172078In reply to: Setup login for private forum?
Pascal Casier
ModeratorCode can go in functions.php of your (child) theme: https://codex.bbpress.org/functions-files-and-child-themes-explained/
Pascal.
February 23, 2016 at 2:44 am #172076In reply to: ERROR: Are you sure you wanted to do that?
Pascal Casier
ModeratorHi @brad3n,
When there is a mention of functions.php to add code, it’s always referring to the functions.php of your (child) theme, never inside a plugin.https://codex.bbpress.org/functions-files-and-child-themes-explained/
Pascal.
February 22, 2016 at 9:13 pm #172065In reply to: Setup login for private forum?
RONO2
ParticipantPascal, so where exactly would I put those particular 3 codes at in the wordpress? or actually in the css section of the theme editor?
February 22, 2016 at 7:32 pm #172063In reply to: bbPress site separate from my main website?
Robin W
ModeratorWhilst I can see some of your concerns, there are no security concerns that bbpress will let your users access your wordpress site backend – none of us would use bbpress if it had backdoors like that.
You core issue seem to stem from
I had to install some bbPress code in my functions file to stop non-administrator profiles from seeing the WordPress main menu at the top of the forum.
Please explain further? or give us the code you used.
With that, in having to add code such as this I subsequently shut down my entire site due to adding code the functions.php file that it didn’t like. Not a good situation for me.
That is a wordpress issue, and if you are not good at coding you should not be editing files ion a live site. You really need a test site
https://codex.bbpress.org/getting-started/testing-your-bbpress-installation/creating-a-test-site/
Yes you can set up a separate domain/sub-domain with wordpress and bbpress running, and just show bbpress in this site. BUT you can’t have this administered by the other wordpress site (well at least not at any level of understanding that you would have – you are not ready for multisite 🙂 )
So either you run one site or two sites. 1 site will not give you security issues if set up correctly in wordpress. 2 sites will mean lots of duplication of usernames, double updating, and more room for error.
I’d suggest you look strongly at the test site route – this will force you to learn about how a wordpress site is put together, which will allow you to do changes with confidence of more technical knowledge and no risk to live
Good luck, and do come back and let us know how you get on
February 22, 2016 at 7:29 pm #172062In reply to: where to put bbpress.css in child-theme
awal16
ParticipantYes, I tried your other code, in an earlier post of yours. But then I get the warnings again.
February 22, 2016 at 7:16 pm #172058In reply to: where to put bbpress.css in child-theme
Robin W
ModeratorAll plugin writers write code to try and not interfere with each other – but occasionally we fail.
I’d suggest you post a thread on their support forum to see if they can help.
Did you try my shorter code – there is a reason for this question !
February 22, 2016 at 7:10 pm #172057In reply to: bbPress & tinyMCE
mateomrqz
ParticipantHi!
Thank you for the reply. I just want to edit the wp_editor that displays when I click
“Topics” > “New Topic”.I want to remove a couple of buttons of that editor, but I don’t want the change to be global, as I have a lot of other editors with specific parameters. This function works:
function my_format_TinyMCE( $in ) { //styles for the editor to provide better visual representation. $in['content_css'] = get_template_directory_uri() . "/build/styles/tiny-mce-editor.css"; $in['block_formats'] = "Paragraph=p; Heading 1=h1; Heading 2=h2"; $in['toolbar1'] = 'formatselect,bold,italic,underline,superscript,bullist,numlist,alignleft,aligncenter,alignright,link,unlink,spellchecker'; $in['toolbar2'] = ''; $in['toolbar3'] = ''; $in['toolbar4'] = ''; return $in; } add_filter( 'tiny_mce_before_init', 'my_format_TinyMCE' );BUT! It will affect and overwrite parameters to my other editors.
The Hooks/Filters in the documentation of bbpress work, but they seem to only affect when creating a topic/forum not from the wp-admin but from the actual bbpress page.Any ideas? Thank you!
-
AuthorSearch Results