• Resolved phoenix360

    (@phoenix360)


    Hi,

    I’m trying to get my front page to display a list of posts with text excerpts. I was able to place a thumbnail of the featured image on the left side with the text excerpt on the right side by editing the content.php from my child theme.

    Currently, the title of the post is above everything else. I’m trying to move the title so that it is only above the text excerpt on the right side.

    Basically, I’m trying to make it look exactly like this: https://www.tzuchi.us/blog/

    If there’s a plugin that can also do this, I’d be happy to try it.

    Thanks for any help.

Viewing 1 replies (of 1 total)
  • Thread Starter phoenix360

    (@phoenix360)

    I figured it out. I had to make two columns, place the image in the left column and the title and text excerpt in the right column:

    <?php
    /**
     * The default template for displaying content
     *
     * Used for both single and index/archive/search.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <header class="entry-header">
    		<?php if ( has_post_thumbnail() && ! post_password_required() && ! is_attachment() ) : ?>
    		<div class="entry-thumbnail">
    
    		</div>
    
    		<?php endif; ?>
    
    	</header><!-- .entry-header -->
    
    <?php if ( is_search() || is_author() ||  is_tag() ||  is_archive()  || is_home () ) : ?>
    
    <div class="entry-summary">
    
      <div id="container">
      <div id="row">
    
    <div id="left">
     <div class="excerpt-thumb">
         <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
         <?php the_post_thumbnail('excerpt-thumbnail'); ?>
         </a>
    </div>
    </div>
      	<div id="right">
        <div class="entry-cat">
     <?php twentythirteen_entry_meta_cat(); ?>
     </div>
      		<?php if ( is_single() ) : ?>
    		<h6 class="archive-title"><?php the_title(); ?></h6>
    		<?php else : ?>
    		<h6 class="archive-title">
    			<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
    		</h6>
    		<?php endif; // is_single() ?>
    
            <?php the_excerpt(); ?>
               <div class="entry-cat">
     <?php twentythirteen_entry_date(); ?>
     <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
     </div>
      	</div>
        </div>
        </div>
    
    	</div><!-- .entry-summary -->
    
    	<?php else : ?>
    	<div class="entry-content">
    		<?php
    			/* translators: %s: Name of current post */
    			the_content( sprintf(
    				__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
    				the_title( '<span class="screen-reader-text">', '</span>', false )
    			) );
    
    			wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
    		?>
    	</div><!-- .entry-content -->
    
    	<?php endif; ?>
    
    </article><!-- #post -->
Viewing 1 replies (of 1 total)
  • The topic ‘Placement of title above text excerpt’ is closed to new replies.