Making WordPress.org


Ignore:
Timestamp:
05/25/2015 10:30:18 PM (10 years ago)
Author:
ocean90
Message:

Rosetta Theme: Responsive and other improvements.

  • Fix missing content on single posts.
  • Update archive template.
  • Update contact page template.
  • Add previous/next post navigation to single posts.
  • Make more link text translatable.

see #1049.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/archive.php

    r465 r1624  
    11<?php get_header(); ?>
    2     <div class="outer" id="mid-wrapper">
     2
     3    <div id="pagebody">
    34        <div class="wrapper">
    4             <div class="section blog">
    5                 <h3><?php _e('Blog', 'rosetta');?></h3>
     5            <div class="col-9">
     6                <?php the_archive_title( '<h2 class="fancy">', '</h2>' ); ?>
     7
     8                <?php
     9                $blog_url = home_url( '/#blog' );
     10                if ( 'page' === get_option( 'show_on_front' ) ) {
     11                    $blog_url = get_permalink( get_option('page_for_posts' ) );
     12                }
     13                ?>
     14                <p><a href="<?php echo esc_url( $blog_url ); ?>"><?php _e( '&laquo; Back to blog', 'rosetta' ); ?></a></p>
     15
     16                <table class="widefat" >
     17                    <?php
     18                    $i = 0;
     19                    if ( have_posts() ) :
     20                        while ( have_posts() ) : the_post();
     21                            $i++;
     22                            ?>
     23                            <tr <?php if ( $i % 2 ) echo ' class="alt" '; ?>>
     24                                <th>
     25                                    <?php the_date( '','<span class="date">', '</span>' ); ?>
     26                                </th>
     27                                <td>
     28                                    <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
     29                                </td>
     30                            </tr>
     31                            <?php
     32                        endwhile;
     33                    else :
     34                        ?>
     35                        <p><?php _e( 'Sorry, no posts matched your criteria.', 'rosetta' ); ?></p>
     36                        <?php
     37                    endif;
     38                    ?>
     39                </table>
     40
     41                <nav class="posts-navigation">
     42                    <?php posts_nav_link( ' &#8212; ', __( '&laquo; Newer Posts', 'rosetta' ), __( 'Older Posts &raquo;', 'rosetta' ) ); ?>
     43                </nav>
    644            </div>
    745        </div>
    846    </div>
    9     <?php if (have_posts()) : ?>
    10         <div class="wrapper">
    11             <div class="section">
    12                 <h2 class="fancy"><?php printf(__('Archives for %s', 'rosetta'), get_the_time(__('F, Y', 'rosetta')));?></h2>
    13                 <a href="/#blog"><?php _e('&laquo; Back to blog', 'rosetta');?></a>
    14             </div>
    15         </div>
    16         <?php while (have_posts()) : the_post(); ?>
    17         <div class="wrapper">
    18         <div class="section blog">
    19                 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    2047
    21                 <p><small><em><?php the_time(__('F j, Y', 'rosetta')); ?>, <?php the_author_link(); ?></em></small></p>
    22 
    23                 <?php the_content(__('Read the rest of this entry &raquo;', 'rosetta')); ?>
    24 
    25                 <?php comments_popup_link(); ?>
    26             <div class="navigation">
    27                 <div class="nav-previous"><?php previous_posts_link(__('&larr; Older Posts', 'rosetta')) ?></div>
    28                 <div class="nav-next"><?php next_posts_link(__('Newer Posts &rarr;', 'rosetta')) ?></div>
    29             </div>
    30 
    31         </div>
    32         </div>
    33 
    34         <?php endwhile; ?>
    35     <?php endif; ?>
    36 <?php get_footer(); ?>
     48<?php get_footer();
Note: See TracChangeset for help on using the changeset viewer.