Skip to:
Content
Pages
Categories
Search
Top
Bottom

Pagination count and Pagination link not working.


  • Rohit
    Participant

    @rohitkc32

    I am trying to create a letters archive for the users on their profile page.

    $contest_args = array(
        'per_page'   => 5,
        'user_id'    => bp_displayed_user_id(),
        'page'       => $page,
        'action'     => 'activity_update',
        'meta_query' => array(
            array(
                'key'     => 'contest_id',
                'compare' => 'NOT EXISTS',
            ),
        ),
    );
    $activities_template = new BP_Activity_Template($contest_args);
    

    I am using bp_activity_pagination_count() for pagination count and bp_pagination_links for pagination links.
    But the pagination count and pagination links are not working.

    Here is the code:

    
    if ( bp_has_activities($contest_args) ) : ?>
        <div id="pag-top" class="pagination w-100 d-flex justify-content-between align-items-center mb-3">
            <div class="pag-count" id="group-dir-count-top">
            <?php echo bp_get_activity_pagination_count( $activities ); ?>
    
            </div>
            <div class="pagination-links" id="group-dir-pag-top">
                <?php bp_activity_pagination_links(); ?>
               
            </div>
        </div>
    
  • You must be logged in to reply to this topic.
Skip to toolbar