Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 226 through 250 (of 32,426 total)
  • Author
    Search Results
  • #240727
    Robin W
    Moderator

    try

    add_filter ('bbp_get_reply_admin_links', 'change_admin_links' ) ;

    #240725
    jlemee
    Participant

    I 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

    Dean Scott
    Participant

    I’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.

    Robin W
    Moderator

    hmmm…

    so have you actually looked at the database tables? or are you getting the status from my code?

    Dean Scott
    Participant

    I 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.

    #240721
    Robin W
    Moderator

    where did this code come from?

    #240718
    jlemee
    Participant

    bbp_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

    #240690
    ncarring
    Participant

    Many 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!

    #240680
    teresaanderson
    Participant

    I 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!

    #240644

    In reply to: Error: Discussion page

    Robin W
    Moderator

    ok, 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

    Contact me

    #240633
    Robin W
    Moderator

    That’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

    #240626

    In reply to: TinyMCE not showing

    Robin W
    Moderator

    this 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

    Code Snippets

    or

    #240625
    Uriahs Victor
    Participant

    I 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.

    #240621
    Uriahs Victor
    Participant

    This 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 );
    #240600
    teresaanderson
    Participant

    I 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.

    #240599
    Robin W
    Moderator

    so quick question – do you have any of the code above active – it should not be, as my plugin should work in its place

    #240597
    adunbound
    Participant

    Hi, 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?

    #240585

    In reply to: PHP Deprecated

    ianuarius85
    Blocked

    I’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.

    #240567

    In reply to: remove login part

    Robin W
    Moderator

    add this to the custom css of your theme

    form.bbp-login-form {
    
    display : none ;
    
    }
    Robin W
    Moderator

    You 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

    #240504

    In reply to: Restrict post creation

    shiylo
    Participant

    Bonjour,

    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.

    cyberfred78
    Participant

    ok I created a snippet with the code about inside and activate it
    there is no change

    Robin W
    Moderator

    if it is use ftp to take out the code snippets plugin

    Robin W
    Moderator

    as 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) ;
    Robin W
    Moderator

    I suspect that I have not coded for Stra pro as well as the free astra – I’ll take a look later today

Viewing 25 results - 226 through 250 (of 32,426 total)
Skip to toolbar