Making WordPress.org


Ignore:
Timestamp:
01/12/2018 04:38:21 AM (7 years ago)
Author:
dd32
Message:

BuddyPress.org & bbPress.org: Add some basic pagination to archive views.

Fixes #638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/archive.php

    r6366 r6368  
    11<?php get_header(); ?>
    2 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
     2<?php if ( have_posts() ) : ?>
     3        <?php while ( have_posts() ) : the_post(); ?>
    34            <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    45            <cite><?php
     
    1011            ?></cite>
    1112            <div class="single-post archive" id="post-<?php the_ID(); ?>"><?php the_excerpt(); ?></div>
    12 <?php endwhile;  else : ?>
     13        <?php endwhile; ?>
     14        <?php
     15        the_posts_pagination(
     16            array(
     17                'mid_size'           => 2,
     18                'prev_text'          => '<span class="screen-reader-text">' . __( 'Previous page', 'bborg' ) . '</span> &larr;',
     19                'next_text'          => '<span class="screen-reader-text">' . __( 'Next page', 'bborg' ) . '</span> &rarr;',
     20                'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'bborg' ) . ' </span>',
     21            )
     22        );
     23        ?>
     24<?php else : ?>
    1325            <p><em><?php _e( 'Sorry, no posts matched your criteria.' ); ?></em></p>
    1426<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.