ThemeShaper Forums » Thematic

[closed]

Reo-ordering Thematic Page Structure

(2 posts)
  • Started 4 years ago by giantbonsai
  • Latest reply from giantbonsai
  • This topic is resolved
  1. giantbonsai
    Member

    I would like to reorder the thematic page structure so that the number of comments on a post displays next to the post date.

    Right now, I understand that the order is .entry_meta / .entry_content / .entry utility, and it is my understanding that .entry_meta holds the date, and .entry_utility holds the number of comments.

    Ideally, I will have the date, a vertical line (i.e. meta-sep) and then the number of comments that post has.

    Posted 4 years ago #
  2. giantbonsai
    Member

    I was able to accomplish my goal by adding an index.php file to my child theme based on this one from the Theme Shaper Tutorial: http://code.google.com/p/your-wordpress-theme/source/browse/trunk/index.php.

    I modified it as follows:

    <?php get_header(); ?>
    
                    <div id="container">
                            <div id="content">
    
    <?php /* The Loop — with comments! */ ?>
    <?php while ( have_posts() ) : the_post() ?>
    
    <?php /* Create a div with a unique ID thanks to the_ID() and semantic classes with post_class() */ ?>
                                    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php /* an h2 title */ ?>
                                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( __('Permalink to %s', 'plasticarmy'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    <?php /* Microformatted, translatable post meta */ ?>
                                            <div class="entry-meta">
                                                    <span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time( get_option( 'date_format' ) ); ?></abbr></span>
                                                    <span class="meta-sep"> | </span>
                                                    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'plasticarmy' ), __( '1 Comment', 'plasticarmy' ), __( '% Comments', 'plasticarmy' ) ) ?></span>
                                                    <?php edit_post_link( __( 'Edit', 'plasticarmy' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>
                                            </div><!-- .entry-meta -->
    
                                            <?php /* Microformatted category and tag links along with a comments link */ ?>
                                            <div class="entry-utility">
                                                    <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'plasticarmy' ); ?></span><?php echo get_the_category_list(', '); ?></span>
    
                                                    <?php edit_post_link( __( 'Edit', 'plasticarmy' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>
                                            </div><!-- #entry-utility -->
                                    </div><!-- #post-<?php the_ID(); ?> -->
    
    <?php /* The entry content */ ?>
                                            <div class="entry-content">
    <?php the_content( __( 'Continue  <span class="meta-nav">&raquo;</span>', 'plasticarmy' )  ); ?>
    
    <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'plasticarmy' ) . '&after=</div>') ?>
    
                                            </div><!-- .entry-content -->
    
    <?php /* Close up the post div */ ?>                    
    
    <?php endwhile; ?>              
    
    <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
                                    <div id="nav-below" class="navigation">
                                            <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> Older posts', 'plasticarmy' )) ?></div>
                                            <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&raquo;</span>', 'plasticarmy' )) ?></div>
                                    </div><!-- #nav-below -->
    <?php } ?>  
    
                            </div><!-- #content -->
                    </div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.