Search Results for 'code'
-
AuthorSearch Results
-
December 2, 2020 at 1:53 pm #216363
In reply to: How to add a custom button
Robin W
Moderatorso what is that bit of code trying to do ?
December 2, 2020 at 1:31 pm #216360In reply to: How to add a custom button
Robin W
ModeratorI’ve just taken a look at your site
the issue is the css
.newposts { float: left; background-color: #DD9933; padding: 5px 6px; margin: -65px 5px 2em 0; }
if you take out the ‘margin: -65px 5px 2em 0;’ then the code is on screen, otherwise it is offscreen
December 2, 2020 at 1:26 pm #216359In reply to: How to add a custom button
Robin W
Moderatorok, so
1. can you post the exact code you are now using
2. can you tell me where your are putting this code?December 2, 2020 at 1:17 pm #216358In reply to: How to add a custom button
akira010203
ParticipantThat’s right! And when I check on the source code in a browser while non loggued, I can clearly see the code with the button.
December 2, 2020 at 1:14 pm #216357In reply to: How to add a custom button
Robin W
Moderatorthat’s no problem, and yes it doesn’t look like the issue is in there.
so the original code works fully with logged in, but not at all with non logged in- yes?
December 2, 2020 at 10:50 am #216346In reply to: How to add a custom button
akira010203
ParticipantIt detect the folder “templates” in the theme. (orange color)
CSS part is green.
I’ve installed a fresh version of my original theme + created a new child theme.
If I modify the function.php of the original theme, all works well.
If I add my content to the function.php of my new child theme, nothing appears…I can’t get the new child theme working, like my current one.
Anyway, strange thing is that I can see the piece of code when I inspect the source with a browser :
<div class="bbp-breadcrumb"><p><a href="xxx" class="bbp-breadcrumb-home"><span class="bsp-home-icon"></span></a> <span class="bbp-breadcrumb-sep">›</span> <span class="bbp-breadcrumb-current">Forum</span></p></div> <p><a href="lasts-topics-posts/"><div class="newposts">Show new posts</div></a></p> <ul id="forums-list-0" class="bbp-forums">
It seems to be hidden by something..
December 2, 2020 at 8:42 am #216341In reply to: How to add a custom button
Robin W
Moderatorok, just tested and my original code works fine on my test site.
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Then come back
December 2, 2020 at 5:39 am #216333In reply to: How to add a custom button
akira010203
ParticipantThanks Robin but I don’t think this is the easiest way for me to make this button available for users and guests.
When [bbp-topic-index] is available for all (no restrictions in my board), I just need to put my button available for everyone.
I’ve tried this :
add_action ('bbp_template_before_forums_index' , 'rew' ) ; function rew () { if(!is_user_logged_in()) return; echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ; }
and
function rew () { if ( is_user_logged_in() ) { echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ; } else echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ; }
But doesnt works..
December 1, 2020 at 7:13 pm #216318In reply to: How to add a custom button
akira010203
ParticipantHello Robin, once again your advice rocks!
Here is my result :
Function.php of my child theme :
add_action ('bbp_template_before_forums_index' , 'rew' ) ; function rew () { echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ; }
and my css :
.newposts { float: left; background-color:#DD9933; padding: 5px 6px; margin:-65px 5px 2em 0; } .newposts a { color:#f2f2f2 !important; border:none; border-radius:0; box-shadow: none; color:#ffffff; font-size:13px; } @media(max-width:580px) { .newposts { float: right; background-color:#DD9933; padding: 5px 6px; margin:-15px 0px 2em 0; } .newposts a { color:#f2f2f2 !important; border:none; border-radius:0; box-shadow: none; color:#ffffff; font-size:13px; } }
I had to make a custom CSS to get it responssive with mobile phones.
I still got a little issue which is that my buton dn’t appear when you’re not connect, I need to fix that!
December 1, 2020 at 5:24 pm #216316In reply to: How to add a custom button
Robin W
Moderatorthere is a hook in the content-archive-forum.php file you can use
bbp_template_before_forums_index
so
add_action ('bbp_template_before_forums_index' , 'rew' ) ; function rew () { //your code here eg echo 'hello' ; }
December 1, 2020 at 5:11 pm #216315In reply to: Any shortcodes in footer breaks on pages of bbpress
Robin W
Moderatorjust tried a shortcode in the footer of my test site running twentyten, and it works on both bbpress and non bbpress pages using the text widget
December 1, 2020 at 3:24 pm #216313In reply to: Any shortcodes in footer breaks on pages of bbpress
archux
ParticipantThe function is_bbpress() is for any page of bbpress
Does not matter, it is account or forum or topic… on all pages…
Footer is built with visual composer…If i use a shortcode to display forum index, the footer works fine. as soon i click into form:
https://<domain>/forums/forum/<forum name>/ footer breaks
https://<domain>/forums/topic/<topic name>/ footer breaks
https://<domain>/forums/user/<user name>/ footer breaksIt becomes as: [vc_row full_width=”stretch_row” css=”…” ….]…….[/vc_row]
Looks like on those page the WordPress function do_shortcode is disabled/unactivated…
Do this make more clear on what pages and what happens with footer?
December 1, 2020 at 3:05 pm #216312In reply to: Any shortcodes in footer breaks on pages of bbpress
Robin W
Moderatorcan you give an example – eg of a footer shortcode that breaks and what bbpress page
December 1, 2020 at 2:13 pm #216305Topic: Any shortcodes in footer breaks on pages of bbpress
in forum Troubleshootingarchux
ParticipantHi
This is a major issue with bbpress and I could not find a resolution to it. I found couple of similar requests but no one have full resolution.
Basically, if page can be recognized as is_bbpress() true than the footer shortcodes breaks.
How to fix that? Is there some patch?
November 30, 2020 at 6:07 pm #216273In reply to: BBpres isnt really responssive with my theme
akira010203
ParticipantI dit the trick with some CSS improvments :
width: 100px;
padding: 2px;@media(max-width:580px) { div#bbpress-forums { overflow: visible !important; } #bbpress-forums span.bbp-admin-links a, #bbpress-forums span.bbp-admin-links { width: 100px; padding: 2px; color: grey; } }
November 29, 2020 at 3:22 pm #216252In reply to: Topics browser not working
LBandy
ParticipantNo worries Robin, I appreciate you are trying to help!
Your question raises a very valid point – I didn’t think it could be related. I currently have my Forums page set up like this:
Recent topics [bbp-topic-index] All topics [bbp-forum-index]
November 29, 2020 at 1:32 pm #216249In reply to: Is there an easy way to download all forum posts?
uscjohn
ParticipantNovember 29, 2020 at 1:17 pm #216247In reply to: Topics browser not working
Robin W
Moderatorsorry, working across many things and missed that.
so that page is made up of ‘all topics’ and ‘recent topics’ – are these shortcodes on a page, or how is this page content created?
November 28, 2020 at 8:58 pm #216241In reply to: Can AJAX be enabled for bbPress?
berry metal
ParticipantOh and I forgot to mention that I did test it by deactivating plugins and changing theme. The issue persists, when the shortcode is used.
Is AJAX enabled for the buttons if the Subscribe and Favorite buttons are used within the Replies shortcode?November 28, 2020 at 2:05 pm #216239In reply to: Forum theme only works “backwards”
flamuren
ParticipantMany thanks I will give it a try. However there is so many things that is not working properly so its starting to become a case for some freelancer site. I dont really know what I am doing 🙂
I read your guide: https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/
But I cant get the forum to display using method 1 in the above guide. And method 2 is the one I have done from the start but cant get to look the way i want.
If the plugin “bbp style pack” fix the design, there is still the issue with weird menus and different urls within the forum etc. Could it be that I created the forum before changing WP-theme? Could it help to remove BB-press and then reinstall it from the ground up?
November 27, 2020 at 7:47 am #216226In reply to: Add custom tab to profile page
Babak Fakhamzadeh
ParticipantYeah, that should be fine, @neon67.
In my point 4, above, you would add a tab for your private chats and then just include the shortcode via a print do_shortcode().
November 27, 2020 at 4:48 am #216224In reply to: Content filter not working
Robin W
Moderatorif within content you can use
but if at the bottom of ‘bbpress’ pages, then there are a bunch of actin hooks you can link to
do_action( 'bbp_template_after_forums_index' ); do_action( 'bbp_template_after_topics_loop' ); do_action( 'bbp_template_after_replies_loop' ); do_action( 'bbp_template_after_user_profile' ); do_action( 'bbp_template_after_search_results_loop' );
should get you most of the way there
November 27, 2020 at 2:01 am #216220In reply to: Add custom tab to profile page
neon67
ParticipantHello! I want to add a new tab to the User profile with the “private messages” shortcode (separate plugin). In order for users to be able to operate with their message box inside the profile.
May be done by @mastababa way?
Where need to put the message-shortcode at the last stage of example coding (or first make a page with a shortcode and then insert it?)November 26, 2020 at 3:37 pm #216211Topic: Autoptimize and bbpress
in forum TroubleshootingLars Henriksen
ParticipantHello,
I would like to use autoptimize on a site with bbpress, but aggregating Js-files breaks the bbpress editor.
By searching the forum I found this topic, but maybe more files have to be excluded in 2.6?
Does anyone here aggregate bbpress js succesfully – if so, how?
Thanks, Lars
November 25, 2020 at 10:01 am #216189In reply to: @mention functionality on forums
Robin W
Moderatorthe setting is ‘bmen_mute’ and if present then email not sent. If absent, then email sent
so
$do_not_send = get_user_meta ($user_id, 'bmen_mute' , true) ; if (empty ($do_not_send)) { //then send } else { //do not send }
-
AuthorSearch Results