WordPress.org

Making WordPress.org

Changeset 6368


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

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

Fixes #638.

Location:
sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base
Files:
2 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; ?>
  • sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/style.css

    r4632 r6368  
    401401}
    402402
     403/* archive pagination */
     404
     405nav.pagination {
     406    text-align: center;
     407}
     408
     409nav.pagination span.page-numbers.current {
     410    font-weight: bold;
     411}
     412
    403413/* =Headers
    404414-------------------------------------------------------------- */
     
    612622    color: #000;
    613623}
     624
     625/* =Accessibility
     626--------------------------------------------------------------*/
     627
     628/* Text meant only for screen readers. */
     629.screen-reader-text {
     630    clip: rect(1px, 1px, 1px, 1px);
     631    height: 1px;
     632    overflow: hidden;
     633    position: absolute !important;
     634    width: 1px;
     635    word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
     636}
     637
     638.screen-reader-text:focus {
     639    background-color: #f1f1f1;
     640    -webkit-border-radius: 3px;
     641    border-radius: 3px;
     642    -webkit-box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
     643    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
     644    clip: auto !important;
     645    color: #21759b;
     646    display: block;
     647    font-size: 14px;
     648    font-size: 0.875rem;
     649    font-weight: 700;
     650    height: auto;
     651    left: 5px;
     652    line-height: normal;
     653    padding: 15px 23px 14px;
     654    text-decoration: none;
     655    top: 5px;
     656    width: auto;
     657    z-index: 100000; /* Above WP toolbar. */
     658}
     659
    614660
    615661/* =Images
Note: See TracChangeset for help on using the changeset viewer.