Search Results for 'code'
-
Search Results
-
Hi, I’m using this code from @stagger-lee to enable ability to create featured images in topics:
When ever I create featured image, they all come out to 400px by 400px. Is there a way to set the featured images to a different size, such as 600px by 400px?
Thank you for any suggestions.
Topic: change background color
I’m usually ok with using css in my child theme, but struggling with this.
I need to change the background color only of the sticky topics area here:
https://www.lifeleap.org/community/forums/forum/lifeleap-cafe/lifeleap-institute-related/
I have the background color set with this css (even and odd):
#bbpress-forums ul.oddBut I just can’t figure out how to change background color only on the sticky topics.
Thanks for any suggestions.
When a user quotes another post using the quote button, their post shows the bbcode as plain text. I tried to recreate the issue on my end with a test account (non-admin) in incognito mode, and was not able to recreate the issue. Any idea what could be causing it? (example linked below)
Wordpress version: 6.8.2
bbPress version: 2.6.14
Link: example post with issueI have this css in my child theme css file:
.bbp-topics ul.sticky .bbp-author-avatar { display: none !important; }But it doesn’t hide the avatar. Any suggestions on how to get this to work properly?
I get this warning in Search Console…
More than 2,000 of your forum pages are missing structured data for discussion forums. Once implemented, Google can identify and display related online discussions on your site in relevant search results features.And it redirects me to this guide:
Is there anything I can do?
I have disabled all plugins other than buddypress and bbpress.
Issue requires both to enabled. buddypress by itself does not cause this.I am seeing this VERY HIGH log spam on every page load:
Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the
bbpressdomain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at theinitaction or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in …/wp-includes/functions.php on line 6121Hello
My question is:
In the addressIn the issue
25.Restricting User Access to the WordPress backendAdd this PHP code snippet so that only users who can only edit posts can access the WordPress admin section.
Which was introduced to prevent the logged-in user from accessing the counter of the following code/**
* Redirect back to homepage and not allow access to
* WP backend for Subscribers.
*/
function rkk_redirect_admin(){
if ( ! current_user_can( ‘edit_posts’ ) ){
wp_redirect( site_url() );
exit;
}
}
add_action( ‘admin_init’, ‘rkk_redirect_admin’ );The code works fine, but the bug is that:
Although it appears to prevent a common user from accessing the WordPress dashboard, the same user can easily bypass the code ban and log in to the dashboard by opening a new tab in the browser and entering the address
https://wordpress.org/wp-admin/
in that tab and pressing Enter. This is the bug in the above code.
The question is:
How can I change the above code to prevent the trick of logging into the dashboard as described above?Thank you in advance for your advice.
I have errors appearing on forum, above all the content: Warning:
Undefined array key "capabilities" in /home/lifeleap/public_html/community/wp-includes/class-wp-roles.php on line 292Any ideas on what this error might be related or what I can do to troubleshoot/fix this issue?
Thank you for any help.
Topic: show_search=”false”
Bonjour,
J’appelle sur mon site :
echo do_shortcode(‘[bbp-topic-index show="5" show_search="false"]‘);
Seulement le moteur de recherche s’affiche quand mĂŞme, avez-vous une idĂ©e ou une solution svp ?
MerciI’m calling on my website:
echo do_shortcode(‘[bbp-topic-index show="5" show_search="false"]‘);
Only the search engine is still displayed. Do you have any ideas or solutions, please?
ThanksHi everyone,
I’d like to share a very useful snippet for bbPress that I had a hard time finding on Google, but which can save a lot of time.
For many communities it’s extremely helpful to have the “Notify me of follow-up replies via email” box checked by default. This way, users are automatically notified of new replies and are more likely to come back to the forum and engage in the discussion.
Here is a simple solution that works on the latest WordPress + bbPress. Just add it to your theme’s functions.php or into a small custom plugin:
// Auto-check the "Notify me of follow-up replies via email" box (topic + reply forms) add_action('wp_footer', function () { if (is_admin() || !function_exists('bbp_is_subscriptions_active') || !bbp_is_subscriptions_active() || !is_user_logged_in()) { return; } ?> <script> document.addEventListener('DOMContentLoaded', function () { var t = document.getElementById('bbp_topic_subscription'); if (t && !t.checked) t.checked = true; var r = document.getElementById('bbp_reply_subscription'); if (r && !r.checked) r.checked = true; }); </script> <?php }, 99);With this snippet, whenever a logged-in user creates a new topic or reply, the subscription checkbox will already be checked by default.
Of course, the user can still uncheck it if they don’t want notifications.This small trick makes it much easier to keep members engaged and ensures they don’t miss important replies.
Hope it helps others too, since I believe this should be more widely documented!