Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 3,626 through 3,650 (of 32,481 total)
  • Author
    Search Results
  • #201658

    In reply to: Edit Pagination Range

    Robin W
    Moderator

    ok, the code I gave you was topics in a forum, not replies in a topic.

    try this instead

    add_filter( 'bbp_replies_pagination', 'rew_change_shown' ) ;
    
    function rew_change_shown ($args) {
    	$args['mid_size'] = 8 ;
    return $args ;
    }
    #201652
    John
    Participant

    I’ve been trying to turn off mentions using:

    add_filter( 'bbp_find_mentions', '__return_false' );

    and

    add_filter( 'bp_activity_do_mentions', '__return_false' );

    but it’s not working. Has this changed in v2.6?

    Running bbPress v2.6-rc-7 and buddypress 4.3.0

    I want to turn it off as it’s not required by the site, but mainly that it breaks URLs that happen to contain a username as described here.

    Any ideas on how I can turn off @mentions?

    #201645

    In reply to: Edit Pagination Range

    Robin W
    Moderator

    Right now, It display 1,2,3…722,723,724

    so is this EXACTLY what it displayed without the code ?

    #201642

    In reply to: Edit Pagination Range

    Robin W
    Moderator

    you want ‘snippets’ that is the php code bit

    #201637

    In reply to: Edit Pagination Range

    Robin W
    Moderator

    Additional CSS panel

    ah, this is not css, this is php code, it needs to go in the functions file of your child theme or the code snippets plugin. If it is the latter, that should also give you what then error is – I need to know what that say if it doesn’t work

    #201635

    In reply to: Edit Pagination Range

    armyadarkness
    Participant

    Yes, when I copy that code into the Additional CSS panel, all of those “Red X” appear “unexpected characters on line… ” etc.

    #201631

    In reply to: Edit Pagination Range

    armyadarkness
    Participant

    Thanks a lot Robin, unfortunately, the code didn’t work at all. I copied and pasted it exactly, and even tried that plugin. It just gives errors.

    #201619

    In reply to: Edit Pagination Range

    Robin W
    Moderator

    I can’t remember it ever being asked πŸ™‚

    However after a bit of digging, this will change it

    add_filter( 'bbp_topic_pagination', 'rew_change_shown' ) ;
    
    function rew_change_shown ($args) {
    	$args['mid_size'] = 8 ;
    return $args ;
    }

    8 shows ‘8 +previous and next’ – so 10 – amend the number to whatever you want

    Put this in your child theme’s function file – or use

    Code Snippets

    #201618
    dustineli
    Participant

    looks to me like bbpress-functions.php is not loading the topic.js nor reply.js when using a shortcode to load a topic.

    I commented out this if and then the scripts load:

    /*if ( bbp_is_single_topic() ) {*/

    // Topic favorite/unsubscribe
    $scripts[‘bbpress-topic’] = array(
    ‘file’ => ‘js/topic.js’,
    ‘dependencies’ => array( ‘jquery’ )
    );

    // Hierarchical replies
    if ( bbp_thread_replies() ) {
    $scripts[‘bbpress-reply’] = array(
    ‘file’ => ‘js/reply.js’,
    ‘dependencies’ => array( ‘jquery’ )
    );
    }
    /*}*/

    so similar to the above post it appears that bbp_is_single_topic() is returning false for some reason. I tested this without any other plugins and also with the latest development version and the scripts still do not load unless I comment out that if. I suppose this means these scripts get loaded all the time but everything seems to still work

    mattbru
    Participant

    What is the secret to modifying/changing the query on the topic archive page? I want to list all topics on that page rather than have 16, and i do not want pagination. On normal wordpress post types this is easily done with pre_get_posts filter. But how is it done with bbpress?

    I have tried this:

    
    function bbp_change_topic_archive_query_args( $query = array() ) {
    	$query['order'] = 'asc';
    	$query['orderby'] = 'title';
    	$query['post_count'] = -1;
    	$query['posts_per_page'] = -1;
    	return $query;
    }
    add_filter('bbp_has_topics_query','bbp_change_topic_archive_query_args');

    and this: (but this requires a shortcode to work properly)

    function bbp_my_register_custom_views() {
    	bbp_register_view( 
    		'asc', __( 'A-Z' ), 
    		array(
    			'orderby' => 'title',
    			'order' => 'ASC',
    			'post_count' => '-1',
    			'posts_per_page' => '-1',
    			'hide_empty' => false,
    		), false );
    }
    add_action( 'bbp_register_views', 'bbp_my_register_custom_views' );

    What else can be done?
    This has to be possible.

    wp v5.2.2, bbp 2.5.14
    site is a pw protected site. I can give access privately if necessary.

    Thanks!

    #201586
    Robin W
    Moderator

    This is because in the bbpress plugin there is a template called content-search.php. Many themes also now have a template file called content-search.php. Since the bbPress templates don’t necessarily need to be in a bbPress folder, the bbPress plugin is choosing the template from your theme before the template that is actually in bbPress.

    To fix copy content-search.php from the bbPress plugin templates and place it in a child theme in a folder called bbpress.

    Functions files and child themes – explained !

    So create a directory on your child theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-search.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/content-search.php
    bbPress will now use this template instead of the original

    #201530
    #201512
    mjthehunter
    Participant

    Hi,

    Over the past few weeks I’ve been customizing bbress to my liking using the live css editor in wordpress.
    I tried moving it all to a stylesheet within my child theme in a folder called css.
    I’ve named the file bbpress.css.

    Everything was working fine in the wordpress editor, but after moving it to bbpress.css a lot of things no longer work.
    Even when I try !important, a lot of things still don’t to work.

    I should note that some of the code does work which is why this confuses me.
    Any suggestions?

    WordPress 5.2.2
    BBPress 2.5.14
    https://flippednormals.com/forums

    #201494
    andreasyeah
    Participant

    where can i paste this code? i have the same problem

    #201483
    Robin W
    Moderator

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-anonymous.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-anonymous.php
    bbPress will now use this template instead of the original
    and you can amend this

    in that template you will see

    <p>
    			<label for="bbp_anonymous_email"><?php _e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
    			<input type="text" id="bbp_anonymous_email"   value="<?php bbp_author_email(); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_email" />
    		</p>

    just remove that – I think that should work

    Robin W
    Moderator

    @danishsard

    some great people wrote bbpress software for free, spent many many hours writing code, getting feedback, improving and supporting it – all for free and they did this for many years.

    In the background they do work on bbpress form time to time.

    That they now are mainly doing other things is sad for us, but they have a perfect right to do as they wish, and should feel under no obligation to spend time supporting the code.

    Similarly I have written a number of plugins that do stuff in bbpress, and I support these as I am able to and when I have free time. I also do some support on here. But this is all voluntary, and there will come a time when I no longer wish to do so.

    There are a number of things that bbpress could do differently – what you call ‘should be repaired’ – but that is just your view on how it should work, and no-one is under any obligation to do anything – that is how OSF software works.

    I can replicate your issue of a non existent page, and when I get some time I may (or may not) look at how to fix this.

    But please be thankful that free code is out there and make the most of what it does, not resentful of what it does not do.

    #201451
    Robin W
    Moderator

    use

    Code Snippets

    and paste it in there

    #201449
    andreasyeah
    Participant

    Hello i have the same problem,

    how can i solve this problem?
    Idk where to paste the fix code.
    Thank you for your help

    Robin W
    Moderator

    Error – when wordpress can be used for the wordpress discussion. Someone will send a new topic with these words – it is automatically redirected to a non-existent page – this is a forum bug.

    can you describe an exact series of stepsto get this error – I do not understand

    The entire wordpress discussion settings should also work bbpress – and not just selected elements – that would increase the functionality of the forum at zero cost.

    zero cost ?? – just a massive recode of bbpress taking many many hours!!! What bit is missing ?

    #201412
    kdelsimone
    Participant

    @blogxkomo I created a custom.php file and dropped the code in there. Works like a charm. You could also try creating a custom plugin or using @jrevillini ‘s solution above.

    #201407
    James Revillini
    Participant

    Yes, you could add it to functions.php, but it may be easier for you to install the plugin Code Snippets and then paste it into a snippet like so: http://tinyurl.com/y49p67as

    #201402
    blogxkomo
    Participant

    where this code to input? https://gist.github.com/jrevillini/7f38ee887d7e6919cfc31c6a7e2cc514

    i already put this script in my functions.php but my blog error …

    #201371
    Robin W
    Moderator

    try

    #bbpress-forums .ast-col-md-6 {
    	width: auto;
    }
    #201370
    techiebraj
    Participant

    When I add this CSS code then my website another archive page(Category page) is also affecting, e.g., https://staging.keeptaxisalive.org/category/blogs/

    I don’t want to affect all the archive. Only forum page should be auto width only.

    Thank you!

    #201367
    Robin W
    Moderator

    it is because your theme has this set in a box

    .ast-col-md-6 {
    	width: 50%;
    }

    add this to your custom css

    .ast-col-md-6 {
    	width: auto;
    }
Viewing 25 results - 3,626 through 3,650 (of 32,481 total)
Skip to toolbar