• I would like to display only the excerpts on archives pages and not the whole paragraphs till the command More. In fact it would be more logical in small screens.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I just needed to change this myself…. I created a child theme. here’s one if you need help with that. Then I copied the file twentysixteen/template-parts/content.php to my child theme, so: mychildtheme/template-parts/content.php

    and modified the contents of that file to be:

    <?php
    /**
     * The template part for displaying content
     *
     * @package WordPress
     * @subpackage Twenty_Sixteen
     * @since Twenty Sixteen 1.0
     */
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
    			<span class="sticky-post"><?php _e( 'Featured', 'twentysixteen' ); ?></span>
    		<?php endif; ?>
    
    		<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
    	</header><!-- .entry-header -->
    
    	<?php twentysixteen_post_thumbnail(); ?>
    
    	<div class="entry-content">
    		<?php the_excerpt(); ?>
    	</div><!-- .entry-content -->
    
    	<footer class="entry-footer">
    		<?php twentysixteen_entry_meta(); ?>
    		<?php
    			edit_post_link(
    				sprintf(
    					/* translators: %s: Name of current post */
    					__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ),
    					get_the_title()
    				),
    				'<span class="edit-link">',
    				'</span>'
    			);
    		?>
    	</footer><!-- .entry-footer -->
    </article><!-- #post-## -->
    Thread Starter ib.property

    (@ibproperty)

    Thank you Helga, but in the meanwhile I have switched to Divi theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display only excerpts on archives?’ is closed to new replies.