• I was wondering if there was a code for me to get a full post for the first post then excerpts for the rest. I’m using the 1.2 version..

    Also where would I put the code?

Viewing 1 replies (of 1 total)
  • Hi D

    You can do it customizing the wp-content/themes/fashionistas/content.php file. I will suggest you to use child theme for making the change, so that the change remain preserved even after the theme is updated, which you need to do.

    Replace the following set of codes from line number 30

    <?php if ( ( is_search() && get_theme_mod('athemes_search_excerpt') =='' ) || ( is_home() && get_theme_mod('athemes_home_excerpt') =='' ) || ( is_archive() && get_theme_mod('athemes_arch_excerpt') =='' ) ) : ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		<!-- .entry-summary --></div>
    	<?php else : ?>
    		<div class="clearfix entry-content">
    			<?php the_content( __( 'Continue Reading <span class="meta-nav">&rarr;</span>', 'athemes' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'athemes' ), 'after' => '</div>' ) ); ?>
    		<!-- .entry-content --></div>
    	<?php endif; ?>

    with the following code

    <?php $recent_post = wp_get_recent_posts( array( 'numberposts' => 1, 'post_status' => 'publish' ), OBJECT ); ?>
    	<?php if ( $recent_post[0]->ID === get_the_ID() ) :?>
    		<div class="clearfix entry-content">
    			<?php the_content( __( 'Continue Reading <span class="meta-nav">&rarr;</span>', 'athemes' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'athemes' ), 'after' => '</div>' ) ); ?>
    		<!-- .entry-content --></div>
    
    	<?php else : if ( ( is_search() && get_theme_mod('athemes_search_excerpt') =='' ) || ( is_home() && get_theme_mod('athemes_home_excerpt') =='' ) || ( is_archive() && get_theme_mod('athemes_arch_excerpt') =='' ) ) : ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		<!-- .entry-summary --></div>
    	<?php else : ?>
    		<div class="clearfix entry-content">
    			<?php the_content( __( 'Continue Reading <span class="meta-nav">&rarr;</span>', 'athemes' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'athemes' ), 'after' => '</div>' ) ); ?>
    		<!-- .entry-content --></div>
    	<?php endif; endif; ?>

    Also make sure you have checked, excerpt for home page in the theme customizer.

    Hope it helps!!

    Thanks

Viewing 1 replies (of 1 total)

The topic ‘Code for first full post/excerpt for rest’ is closed to new replies.