• Resolved sr_blasco

    (@sr_blasco)


    Hi,
    I want to show all files in user profile page, without a “load more” button. I can’t figure out how to do it via filter, so I don’t have to modify core files. Is there any way?

    Furthermore, my “load more” button shows more items, but they are shown twice. It could be a conflict with other js. By the way, if I can resolve the first issue, this one is not relevant to me.

    Regards,
    Fernando

    https://wordpress.org/plugins/buddydrive/

Viewing 1 replies (of 1 total)
  • Hi @sr_blasco

    you can achieve your need using this snippet:

    function sr_blasco_no_pagination( $query_args = array() ) {
    	// Do this for single users and single groups...
    	if ( ! bp_is_user() && ! bp_is_group() ) {
    		return $query_args;
    	}
    
    	$no_pagination = array( 'per_page' => false );
    
    	if ( empty( $query_args ) ) {
    		$query_args = $no_pagination;
    	} else {
    		$query_args = array_merge( $query_args, $no_pagination );
    	}
    
    	return $query_args;
    }
    add_filter( 'bp_before_buddydrive_has_items_parse_args', 'sr_blasco_no_pagination', 10, 1 );
Viewing 1 replies (of 1 total)

The topic ‘Load more’ is closed to new replies.