Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 826 through 850 (of 32,296 total)
  • Author
    Search Results
  • #232235
    Robin W
    Moderator

    ‘Associated Courses and Groups’ has nothing to do with bbpress.

    I’d suspect it is either something in learndash, or something you have called a page in WP where the shiortcode is held, or a name you have given to something.

    #232234
    theriddler
    Participant

    Hello,

    I am using LearnDash in combination with bbpress and the integration addin. Now there appears a sentence “Associated Courses and Groups:” on the forum overview page, which I can’t translate. LearnDash support said it has something to do with the [bbp-forum-index] shortcode output.

    Could you help me translate this string?

    Best regards
    Rene

    #232208
    vvmdov
    Participant

    Hello, I am using BBpress(2.6.9) on my website(WordPress 6.0.3) with Divi theme(4.18.0). When using any widget/shortcode of BBpress, as well as when trying to search the Forum, the header section I created with Divi changes its shape on the next opened page, it looks completely different and messy – the section size decreases, the menu items are arranged at the bottom, the font colors change, the logo becomes huge.

    I contacted Divi support, but since they don’t even know what BBpress is, they didn’t know how to fix the problem and advised me to contact “BBpress customer support”:
    – “So it seems like the archive template in the plugin is not working in the same way as the standard single post. You can clarify with the developers what template they are using and how it can be changed to make it work in the same way as the single template, at least the general header and footer parts.”

    As desperate as I was, I didn’t want to pass without trying. What is the cause of this problem, how should I solve it? Has anyone experienced this problem or know of a solution?

    #232166
    codejp3
    Participant

    Using the clues in this topic, this is what I have working for ANY FSE Block theme with the wonderful style-pack plugin:

    
    function fse_bbpress_template( $template ) {
    	$template = ABSPATH . WPINC . '/template-canvas.php';
    	return $template;
    }
    
    function fse_bbp_theme_compat( $template ) {
    	$template= BSP_PLUGIN_DIR.'/templates/bbpress.php';
    	return $template;
    }
    
    if ( ! function_exists( 'fse_bbpress_support' ) ) {
    	function fse_bbpress_support() {
    		// gt current theme dir
    		$theme_dir = get_template_directory();
    
    		// Detect if FSE theme or traditional.
    		// FSE Block themes require a theme.json file.
    		// Use that to check instead of theme name or parent theme name.
    		// Perhaps a better method is available, but this works for now.
    		$fse_theme = false;
    		if ( file_exists( $theme_dir.'/theme.json' ) ) { $fse_theme = true; }
    		
    		if ( !$fse_theme ) { return; }
    		
    		// disabled because it doesn't seem to be needed, regardless of style pack 
    		// $bsp_style_settings_theme_support['twentytwentytwo_activate'] setting
    		// template-canvas.php seems to be included by default
    		
    		//add_filter( 'template_include', 'fse_bbpress_template' );
    		
    		add_filter ( 'bbp_template_include_theme_compat' , 'fse_bbp_theme_compat' );
    	
    	}
    	
    }
    add_action( 'after_setup_theme', 'fse_bbpress_support' );
    

    and this little helper function helped me figure out what template was getting loaded in the first place:

    
    function fse_bbpress_print_template() {
    	if ( is_bbpress() ) {
    		//echo at the bottom of the page visibly
    		echo get_page_template();
    		
    		// or echo the template silently as an HTML comment
    		// echo '<!-- ' . get_page_template() . ' -->';
    	}
    }
    // DISABLE THIS ACTION HOOK AS SOON AS POSSIBLE! DO NOT LEAVE IT ACTIVE WHEN DEBUGGING IS DONE!
    add_action( 'bbp_template_after_forums_loop', 'fse_bbpress_print_template' );
    

    I’ve tried this on a few different FSE Block themes, and BBPress is displaying properly, and the style tweaks from the wonderful Style-Pack plugin are being applied.

    Like I said, it’s working regardless of the $bsp_style_settings_theme_support[‘twentytwentytwo_activate’] setting within the BSP plugin, but it uses the template from the plugin so it would still need to be installed an active, even without any styling tweaks applied.

    It’s not a permanent solution, but perhaps aspects of this could be applied to the BSP plugin, or your own custom solution.

    #232142
    Robin W
    Moderator

    I presume you have ‘anyone can register’ ticked in :

    dashboard>settings>general>membership – that will let anyone join, and at that stage you cannot know if they are real or not, so no automatic way to prevent.

    I’d suggest you move to a closed registration, so that you can manually join people.

    as for getting rid of those in there – you would need some code which would look for all users who have not made a forum post, but this might delete genuine users, so without a forumla to work out who is real or not, it would be hard to code/

    #232133
    Robin W
    Moderator

    you could add this to change the wording

    function change_translate_text( $translated_text ) {
    	if ( $translated_text == 'You cannot reply to this topic.' ) {
    	//set limit
    	$limit = 5 ;
    	//get replies for today
    	$user_id = get_current_user_id() ;
    	$reply=bbp_get_reply_post_type() ;
    	$today = getdate();
    	$args = array(
    		'post_type'=> $reply,
    		'order'    => 'ASC',
    		'orderby' => 'ID',
    		'post_status' => 'publish',
    		'posts_per_page' => -1,
    		'post_author' => $user_id,
    		'date_query' => array(
    		array(
    			'year'  => $today['year'],
    			'month' => $today['mon'],
    			'day'   => $today['mday'],
    		),
    		),
    		
    		);              
    
    	$the_query = new WP_Query( $args );
    	$count = $the_query->found_posts;
    	if ($count>=$limit) $translated_text = 'You have exceeded the number of replies you can post in a day' ;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'change_translate_text', 20 );
    #232132
    Robin W
    Moderator

    Just written this – should work

    add_filter ('bbp_current_user_can_access_create_reply_form' , 'rew_limit_replies') ;
    
    function rew_limit_replies ($retval) {
    	//set limit
    	$limit = 5 ;
    	//get replies for today
    	$user_id = get_current_user_id() ;
    	$reply=bbp_get_reply_post_type() ;
    	$today = getdate();
    	$args = array(
    		'post_type'=> $reply,
    		'order'    => 'ASC',
    		'orderby' => 'ID',
    		'post_status' => 'publish',
    		'posts_per_page' => -1,
    		'post_author' => $user_id,
    		'date_query' => array(
    		array(
    			'year'  => $today['year'],
    			'month' => $today['mon'],
    			'day'   => $today['mday'],
    		),
    		),
    		
    		);              
    
    	$the_query = new WP_Query( $args );
    	$count = $the_query->found_posts;
    	if ($count>=$limit) $retval = 0 ;
    return $retval ;
    }

    Just amend the line ‘$limit = 5 ;’ to whatever number you want

    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

    #232086
    wujackwu
    Participant

    Based on my recent trouble-shooting, your issue could be caused by two potential reasons:

    1. Your CDN service provider altered the link to your video file. You might want try turning it off, so that the address of your video would change back to something like https://yourdomain.com/wp-content/uploads/2022/10/cute_dog.mp4?time=1664812918, which is the actual location of your file. You may also check the source code of our pole line hardware website, on which we encountered a similar issue a few months ago. (We bought Godaddy’s WP plan, and its default CDN setting was turned on. We now use Cloudflare. A much better CDN. )
    2. Or, it may be caused by conflicting plugins installed on your website. Which means the embed function cannot work properly. You could try disable them all and flush your server cache to find the culprit.

    Personally, if you are code-savvy, I would recommend employing a method called lite youtube embed for videos. Simply put, it reduces page loading time by serving your video only after the viewer hit PLAY, which drastically reduces the amount of data transferred on page load.

    That’s all I can come up with based on your information. Best of luck!!

    #232083

    In reply to: Forum has blank pages

    Robin W
    Moderator

    ok, if this is a block theme then come back, otherwise take a look at

    Step by step guide to setting up a bbPress forum – Part 1

    section 8 and look at this link which gives a template

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #232077
    Robin W
    Moderator

    or you could just display the bbpress breadcrumb by by changing the css file, or putting this in the custom css

    .bbp-breadcrumb {
    	display: block !important;
    	padding-top: 20px;
    }
    #232076
    Robin W
    Moderator

    your theme is hiding the bbpress breadcrumbs in

    https://renaloo.com/wp-content/themes/digiqole-child/assets/css/custom.css line 2281

    This function will add a reference to the breadcrumb

    add_action ('bbp_template_before_single_topic' , 'rew_forum') ;
    
    function rew_forum () {
    	echo '<div class="rew_forum">' ;
    	$topic_id = bbp_get_reply_topic_id() ;
    	$forum_id = bbp_get_topic_forum_id() ;
    	echo '<a href="' . esc_url( bbp_get_forum_permalink( $forum_id ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $forum_id ).'</a>' ;
    	echo '</div>' ;
    }

    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

    #232055
    seangowans
    Participant

    Im using BBpress Version 2.6.9 and WordPress version: 5.9.3 and i’m working on my localhost.
    I have followed the documentation (method 2) and I keep ending up with the same issue. The Forum page has the [bbp-forum-index] shortcode which works fine, but when I click on the forum I created it returns a blank page.

    URL structure that returns blank page:
    mysite/forums/forum/test-forum/

    I have removed every plugin except BBPress and tested this on the 2022 WordPress theme and still no luck, any advice you could give me would be greatly appreciated.

    #232052

    In reply to: Order of search result

    quigli
    Participant

    Hello,
    yep, i have access to the code, children-theme installed (‘excellent’)
    Bye, Rainer

    #232038

    In reply to: Order of search result

    samsanatco
    Participant

    Hello
    Can you change the theme codes yourself?

    #232018
    erossini
    Participant

    I have an issue with bbPress. In the settings, I checked under /options-general.php?page=bbpress the option Auto-embed links.

    When I upload a video in the forum, the result is the link to the video instead of a player to play the video.

    How can I fix it?

    #232017
    erossini
    Participant

    In my WordPress website, I added bbPress. When you are in the forum in the section _Support_ and you open a topic, you see this

    In my point of view, the user experience is not great because the user doesn’t know where he or she is. I like to add a full breadcrumb like

    > Forum > Support > Test video

    How can I add this?

    #231983
    Robin W
    Moderator

    following closure of the ‘bbPress – Moderation Tools’ plugin, I added this code to my style pack plugin

    bbp style pack

    once activated you’ll find the moderation tools in

    dashboard>settings>forums

    #231875
    Robin W
    Moderator

    thanks,

    The best I can do is

    .cnt article ul li:before {
     display: none !important ;
    }

    but this will I think take bullet points out everywhere, including your main site.

    #231873
    Robin W
    Moderator

    is that code still in ?

    #231872
    dillonleo
    Participant

    I had a feeling my theme was causing it. I tried inserting that code into my site’s custom css, but unfortunately the bullets are still showing up.

    #231870
    Robin W
    Moderator

    your trheme is adding this – try

    #bbpress article ul li:before {
     display: none;
    }
    #231867
    dillonleo
    Participant

    The page on my forum is full of list bullets. (https://www.turtleholic.com/forums/forum/turtle-questions/)

    Does anyone know how to fix this? I was able to add the following CSS code to the main Forum page (https://www.turtleholic.com/turtleholic-forum/), which removed the bullets from that page. But on the specific forum pages I don’t know how to add custom CSS.

    ul ul li:before {
    display: none;
    }

    ul li:before {
    display: none;
    }

    #231866
    Devcr3
    Participant

    @robin-w I installed the plugin, then I entered the code (mentioned above) in the code php section of the plugin .. in the end I saved. Now I wait 1 hour and see if it works

    #231859
    Robin W
    Moderator

    that’s basically the code which can be added to a functions file, or using

    Code Snippets

    #231847
    Mike Witt
    Participant

    I tried the code on a test site and it appeared to work.
    I updated the Track ticket.

Viewing 25 results - 826 through 850 (of 32,296 total)
Skip to toolbar