[resolved] Help Getting Date and Author Information to Display on Post Excerpts (4 posts)

  1. travelcats
    Posted 2 years ago #


    This might be a really basic question, but I can't seem to figure out how to add date and author information to my blog excerpts using the Twenty Twelve theme. I had modified the child content.php code to get the excerpts to display, but I am not sure what code to add to have the date of the post and author information display again.

    My content.php code

    Here is my website.

    Thanks in advance!

  2. Somegirlwitha.com
    Posted 2 years ago #

    how about adding this:

    <footer class="entry-meta">
    			<?php twentytwelve_entry_meta(); ?>
    			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
    			<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
    				<div class="author-info">
    					<div class="author-avatar">
    						<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
    					</div><!-- .author-avatar -->
    					<div class="author-description">
    						<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
    						<p><?php the_author_meta( 'description' ); ?></p>
    						<div class="author-link">
    							<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    								<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
    						</div><!-- .author-link	-->
    					</div><!-- .author-description -->
    				</div><!-- .author-info -->
    			<?php endif; ?>
    		</footer><!-- .entry-meta -->
  3. travelcats
    Posted 2 years ago #

    Wow, thanks that code was very helpful. So now the author and date information is displaying but it is also displaying a bunch of other stuff that I would like to remove, but have not been able to figure out how to do this.

    For instance on the first posted article, I would like to remove all of the following from showing (text, tags, categories): "This entry was posted in Travel Advice, United States and tagged Calistoga, Napa, Napa besides wine, Napa Valley, Napa Valley without wine, Napa without wine, non-drinker, Oxbow Market, travel, wine country, Yountville"

    Instead I just want it to display
    Posted on July 28, 2013 by travelcats

    Updated content.php code

  4. Somegirlwitha.com
    Posted 2 years ago #

    How about this?
    <p>Posted on <?php the_date(); ?> by <?php the_author(); ?></p>

    For reference:

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.