Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 101 through 125 (of 32,314 total)
  • Author
    Search Results
  • #240798

    2.6.11 is out!

    Blog post imminent.

    Changelog code page updated.

    Sorry everyone 😔

    #240783
    Eusebiu Oprinoiu
    Participant

    Chuckie, try logging in using the standard WordPress login page and rollback to the previous version.
    https://publictalksoftware.co.uk/wp-login.php

    #240782
    Eusebiu Oprinoiu
    Participant

    You can get older versions from the Advanced page on WordPress.org.
    You can find a dropdown with previous versions at the bottom of this page.

    https://wordpress.org/plugins/bbpress/advanced/

    Once you download the version you want, upload the ZIP archive under Plugins > Add New.
    You will be asked to overwrite the existing plugin. Click Yes, and you are back to normal.

    #240774
    Eusebiu Oprinoiu
    Participant

    Hello, Robin!

    I tried all the steps you mentioned before opening this ticket.
    I cleared both the page and object caches and resaved the permalink rules in case this was causing the 404 errors. (although permalink issues would cause problems regardless of the logged-in status)

    In addition to the 404 errors, pages containing queries, like the Blog page or post-type archive pages, load as they should, with 200 OK status, but do not display any content. (the queries return null)

    Reverting to bbPress 2.6.9 solves the issue.
    And as I mentioned, this only happens for anonymous visitors. For administrators and logged-in users the pages work as expected.

    #240767
    Robin W
    Moderator

    Otherwise it is doable but far beyond free help – as I say bbpress just uses wordpress registration so maybe contact a wordpress developer who can do some code for you.

    #240763
    ttiefenbach
    Participant

    Thanks for the quick reply! Unfortunately, your code returned the topic’s title.

    That allowed me to narrow my search, though, and I was able to get the correct functions for my permalink structure:

    function my_filter_thumbnail_id( $thumbnail_id, $post = null ) {
    	if ( $post->post_type != 'topic' )
    		return $thumbnail_id;
    	
    	$forumid = bbp_get_topic_forum_id();
    	if ( $forumid == 6728 )
    		$thumbnail_id = 7091;
    
    	return  $thumbnail_id;
    }
    add_filter( 'post_thumbnail_id', 'my_filter_thumbnail_id', 20, 5 );
    

    I could probably use the bbp_get_forum_title() function to get the tiel to compare, like you suggested, but I went with just validating the ID since it was working.

    Thanks for your help!!

    #240761
    Robin W
    Moderator

    $forumname = bbp_get_forum_title( $post->forum_id );

    #240759
    ttiefenbach
    Participant

    I’m trying to get a default featured image to display using a filter of “post_thumbnail_id” in my child theme’s functions.php file. I’m able to add a default thumbnail for post_type of topic, but I’d like it to be a custom thumbnail based on the id, or name of the forum the topic is in. Here’s what I have so far:

    function my_filter_thumbnail_id( $thumbnail_id, $post = null ) {
    	if ( $post->post_type != 'topic' )
    		return $thumbnail_id;
    	
    	$forumname = get_forum_name( $post->forum_id );
    	if ( $forumname == "wellness")
    		$thumbnail_id = 7091;
    
    	return  $thumbnail_id;
    }
    add_filter( 'post_thumbnail_id', 'my_filter_thumbnail_id', 20, 5 );
    

    The issue is, “get_forum_name(),” is an undefined function. I’m not looking to override the default functions of bbPress, just be able to access the forum_id or forum_name from my theme’s functions.php file. Any help would be greatly appreciated! Thanks

    #240736
    Robin W
    Moderator

    bbpress just uses wordpress registration.

    Wordpress requires users to have an email address for various reasons, including password changing and resetting.

    Whilst this is certainly achievable with code, I do not know of any plugin that allows this.

    No-one sees the email address apart from WordPress admins and the user.

    Dean Scott
    Participant
    Field       Type    Collation  Null  Key  Default  Extra  Privileges
    post_parent  int(11)   NULL     YES    —    NULL      —    select,insert,update,references 
    Dean Scott
    Participant

    It’s in the OP.

    Can you confirm what type of constraint is present on the post_parent column? The error uses the word KEY, which is a constrained column. Obviously, it can’t be a PRIMARY key, since ID is PRIMARY and AUTO INCREMENT, so post_parent set as UNIQUE, INDEX, or other?

    Now, I can run SQL in phpMyAdmin directly addressing post_parent, as in SELECT * FROM wp_posts WHERE post_parent != 0 AND post_type = topics OR post_type = replies;
    and the result is a screen full of all topics and replies.

    Yet this particular query syntax: SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts FORCE INDEX (PRIMARY, post_parent) throws the “doesn’t exist” error, so it must have something to do with the properties of post_parent not being an INDEX? So, HOW to make it one, per the above question.

    #240730
    jlemee
    Participant

    I don’t understand why it’s not work.
    I have a function for topic links and function for answer (reply) links

    // change answer 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'] ;
    }
    
    //change topic links displayed
    add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' ) ;
    function change_topic_admin_links ($r) {
        $r['links'] = apply_filters( 'rw_topic_admin_links', array(
                        'reply'  => bbp_get_topic_reply_link ( $r ),
                        // 'edit'   => bbp_get_topic_edit_link ( $r ),
                        'edit'   => bbp_get_topic_edit_link ( $r ),
                        'trash'  => bbp_get_topic_trash_link ( $r ),
    
                    ), $r['id'] );
        return $r['links'] ;
    }
    #240729
    Robin W
    Moderator

    so this should work, but looks like your function

    // 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(
                    'edit'    => bbp_get_reply_edit_link   ( $r ),
    				//'move'    => bbp_get_reply_move_link   ( $r ),
    				//'split'   => bbp_get_topic_split_link  ( $r ),
    				'trash'   => bbp_get_reply_trash_link  ( $r ),
    				//'spam'    => bbp_get_reply_spam_link   ( $r ),
    				//'approve' => bbp_get_reply_approve_link( $r ),
    				'reply'   => bbp_get_reply_to_link     ( $r )
    
                    ), $r['id'] );
    return $r['links'] ;
    }
    #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

Viewing 25 results - 101 through 125 (of 32,314 total)
Skip to toolbar