Search Results for 'code'
-
AuthorSearch Results
-
June 27, 2024 at 3:31 pm #240727
In reply to: edit answer in forum not work
Robin W
Moderatortry
add_filter ('bbp_get_reply_admin_links', 'change_admin_links' ) ;
June 27, 2024 at 2:00 pm #240725In reply to: edit answer in forum not work
jlemee
ParticipantI found it on a bbpress support discussion because I only wanted you to keep the modify, edit and trash links. But the link to edit never worked, before or after adding this code
June 27, 2024 at 1:58 pm #240724Dean Scott
ParticipantI’m looking directly at wp_posts table. post_parent key has matching values to post_type records (topics, replies) and verified by your code returning zero for any mismatches.
I’ve also added a copy of my theme’s page.php (parent = Kyma, child = Frontech), renamed it bbpress.php, and put it in both parent and child root theme folders (unaltered, because there’s nothing in the theme interfering with the layout and placement of BBP). No change.
June 27, 2024 at 1:45 pm #240723Robin W
Moderatorhmmm…
so have you actually looked at the database tables? or are you getting the status from my code?
June 27, 2024 at 1:40 pm #240722Dean Scott
ParticipantI just discovered more at the end of the PHP error…
LIMIT 0, 15 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), apply_filters(‘template_include’), WP_Hook->apply_filters, bbp_template_include, apply_filters(‘bbp_template_include’), WP_Hook->apply_filters, bbp_template_include_theme_compat, BBP_Shortcodes->display_topic, bbp_get_template_part, bbp_locate_template, load_template, require(‘/plugins/bbpress/templates/default/bbpress/content-single-topic.php’), bbp_has_replies, WP_Query->__construct, WP_Query->query, WP_Query->get_posts
Is this helpful?
Yes, I’ve switched to 2024 theme AND deactivated all plugs, one-by-one. Same error.
June 27, 2024 at 1:37 pm #240721In reply to: edit answer in forum not work
Robin W
Moderatorwhere did this code come from?
June 27, 2024 at 10:34 am #240718Topic: edit answer in forum not work
in forum Troubleshootingjlemee
Participantbbp_get_topic_edit_link work but bbp_get_reply_edit_link not work, my page is blank, can you help me please ? (bbp_get_reply_to_link(), bbp_get_topic_edit_link() and bbp_get_reply_trash_link() works perfectly)
// change admin links displayed add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ; function change_admin_links ($r) { $r['links'] = apply_filters( 'rw_reply_admin_links', array( 'reply' => bbp_get_reply_to_link ( $r ), // 'edit' => bbp_get_topic_edit_link ( $r ), 'edit' => bbp_get_reply_edit_link ( $r ), 'trash' => bbp_get_reply_trash_link ( $r ), ), $r['id'] ); return $r['links'] ; }
thanks for your help
June 26, 2024 at 2:21 am #240690In reply to: bbPress Subscription Feature Not Working
ncarring
ParticipantMany thanks. I actually fixed it after a bit of Googling by installing the code snippets plugin, and installing a snippet to set the filter bbp_get_do_not_reply_address.
This sounds even easier. Thanks!
June 23, 2024 at 3:55 pm #240680In reply to: Remove e-mail field from “form anonymous”
teresaanderson
ParticipantI just went back to my test site and it looks like I’m no longer having the issue. I didn’t make any changes to the code, so I’m not sure why it’s working now, but thanks again!
June 18, 2024 at 10:34 am #240644In reply to: Error: Discussion page
Robin W
Moderatorok, I suspect the theme authors are being less than helpful.
If you are able to FTP can you send me this file
nombreweb/wp-content/themes/classiadspro/includes/actions/general.php
via
June 18, 2024 at 5:33 am #240633In reply to: Generic URL of all forums critical error
Robin W
ModeratorThat’s great – thank you.
This error says that it is within the plugin directorypress
Call to a member function is_built_with_elementor() on bool in
/homepages/25/d981722677/htdocs/clickandbuilds/nombreweb/wp-content/plugins/directorypress/includes/directorypress_functions.php:
but below seems to indicate it is having a problem with the bbpress template
/template-loader.php
But that does not mean it is the fault of directorypress, or indeed bbpress !
There are 2 methods of getting bbpress to display
which method are you using in this guide
https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ item 3
June 17, 2024 at 4:41 pm #240626In reply to: TinyMCE not showing
Robin W
Moderatorthis is a known bug.
either
if( !function_exists( 'bbpress_browser_supports_js' ) ){ function bbpress_browser_supports_js() { echo '<script>document.body.classList.remove("no-js");</script>'; } add_action( 'wp_footer', 'bbpress_browser_supports_js' ); }
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
or
June 17, 2024 at 4:37 pm #240625Topic: TinyMCE not showing
in forum TroubleshootingUriahs Victor
ParticipantI don’t know why, but the TinyMCE toolbar doesn’t show by default on Astra theme and Page Builder Framework theme. It does show on some default WP themes, but I don’t understand why.
In Astra, the toolbar is there in the HTML, but it has
display: none
set to the CSS because of this class string:.no-js .hide-if-no-js
I don’t quite understand what is causing that class to be added onto the toolbar. Can anyone shed some light? Is there some option or filter I need to set for this to show?
I at first thought it detected if there was No JS enabled in the browser but thats not the issue because I can use JS…im visiting my test forum just as Im visiting this one and it shows.
June 17, 2024 at 3:52 pm #240621In reply to: Block users from posting links
Uriahs Victor
ParticipantThis is an old topic but the priority on the filters have changed so the remove filter code provided will not work.
The new priority is 40, so the working code is:
remove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 40 ); remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 40 );
June 12, 2024 at 4:32 pm #240600In reply to: Remove e-mail field from “form anonymous”
teresaanderson
ParticipantI just checked. It doesn’t look like I have the code from the previous posts anywhere on the site. I checked all of the custom CSS screens.
June 12, 2024 at 3:51 pm #240599In reply to: Remove e-mail field from “form anonymous”
Robin W
Moderatorso quick question – do you have any of the code above active – it should not be, as my plugin should work in its place
June 12, 2024 at 1:57 pm #240597Topic: bbpress breaks footer
in forum Troubleshootingadunbound
ParticipantHi, I’m haviong trouble with bbpress and the forum breaking my footer. I’m utilizing the shortcode to input the forum, when I delete the shortcode, the footer realigns. Does anyone know what causes this and how to fix it?
June 12, 2024 at 3:52 am #240585In reply to: PHP Deprecated
ianuarius85
BlockedI’m getting the same message trying to add a new role.
function add_vahennetyt_role() { $subscriber = get_role('subscriber'); add_role( 'vahennetyt_oikeudet', __('Vähennetyt oikeudet'), $subscriber->capabilities ); $role = get_role('vahennetyt_oikeudet'); if ($role) { $role->remove_cap('edit_posts'); } } add_action('wp_loaded', 'add_vahennetyt_role');
Sure, it’s not an error, but I’m getting like 6 of these lines every time anyone loads any page.
[12-Jun-2024 07:47:34 UTC] PHP Deprecated: Creation of dynamic property BBP_Forums_Component::$members is deprecated in /home/.../public_html/wp-content/plugins/bbpress/includes/extend/buddypress/loader.php on line 149 [12-Jun-2024 07:47:36 UTC] PHP Deprecated: Creation of dynamic property BBP_Forums_Component::$members is deprecated in /home/.../public_html/wp-content/plugins/bbpress/includes/extend/buddypress/loader.php on line 149
I’d appreciate it, if I could see all the actual errors and warnings in my logs and not have to slog through these un-messages.
Cheers.
June 10, 2024 at 1:00 pm #240567In reply to: remove login part
Robin W
Moderatoradd this to the custom css of your theme
form.bbp-login-form { display : none ; }
June 5, 2024 at 1:22 pm #240519Robin W
ModeratorYou thoughts are essentially correct, bbpress just uses wp_posts.
So yes if you migrate dev to live you will overwrite the forum, the same is true for comments and anything else that uses the posts table, which is quite a few other plugins you might use later. lots of other tables used by wp plugins also can change in live whilst you are trying things in dev.
In essence you should treat dev as just that – ie not a copy of live, but an environment to check site functionality and look.
There is also a danger if you work in dev and add links and images, these will be the url of the dev site, so when the pages are migrated across all will look ok on the front end, but actually you will be using data/images from dev.
So plugin and theme updates should be tried in dev first, and then repeated in live rather than migrating.
For pages and posts, copy/paste is very easy to use – much of the time you will only be changing one or 2 pages.
If you are using the standard blocks, then switching to the code editor (the 3 vertical dots top right of a page or post edit and then look for the ‘code editor’ choice) make copying/pasting pages and posts super easy.
Yes it is a bit more of a pain, but as you site develops you’ll be glad you learned the techniques
June 4, 2024 at 5:58 pm #240504In reply to: Restrict post creation
shiylo
ParticipantBonjour,
function restrict_bbpress_topic_creation() {
// Vérifier si l’utilisateur est sur une page de création de sujet
if ( bbp_is_topic_create() ) {
// Vérifier si l’utilisateur est un administrateur
if ( !current_user_can( ‘administrator’ ) ) {
// Rediriger l’utilisateur vers la page d’accueil du forum
wp_redirect( bbp_get_forum_url() );
exit;
}
}
}
add_action( ‘template_redirect’, ‘restrict_bbpress_topic_creation’ );Ce script vérifie si l’utilisateur essaie de créer un nouveau sujet et le redirige vers la page d’accueil du forum s’il n’est pas administrateur. Ajoute ce code dans ton fichier functions.php et teste pour t’assurer que ça fonctionne comme prévu.
June 2, 2024 at 10:05 am #240491cyberfred78
Participantok I created a snippet with the code about inside and activate it
there is no changeJune 2, 2024 at 9:33 am #240489Robin W
Moderatorif it is use ftp to take out the code snippets plugin
June 2, 2024 at 9:05 am #240486Robin W
Moderatoras a quick test, can you try
install https://en-gb.wordpress.org/plugins/code-snippets/
and add this code
function rew_astra_bbpress_fix ($value) { if (bbp_is_single_user()) return false ; if (bbp_is_search()) return false ; if (bbp_is_topic_tag()) return false ; if (bbp_is_single_view()) return false ; return $value ; } add_filter ('astra_single_layout_one_banner_visibility', 'rew_astra_bbpress_fix', 50) ;
June 2, 2024 at 5:09 am #240480Robin W
ModeratorI suspect that I have not coded for Stra pro as well as the free astra – I’ll take a look later today
-
AuthorSearch Results