Excerpts to full posts in blog

Hi there,

I want to have my blog posts (http://sienci.com/blog/) to be switched from excerpts, and into full posts so that readers can see the photos in the blogs and not have to open each article to read it.

Thanks,

Andy

Hello Andy,

To do that you’ll need to edit the code which displays the excerpt and change it full content. The first thing to do is to create a child theme, so you’ll be save on updating the theme in the future. If you haven’t yet been familiar with child theme, I’d strongly encourage you read this codex. For further guidance, follow these links:

In your child theme folder, you’ll need to create a new folder and name it as “template-parts”. Then you’ll need a copy of the template-parts/content.php file from parent theme in your newly created folder. So you’ll have your_child_theme_folder/template-parts/content.php. Then edit this file, then find the below code block:


<?php if ( (get_theme_mod('full_content_home') == 1 && is_home() ) || (get_theme_mod('full_content_archives') == 1 && is_archive() ) ) : ?>
	<?php the_content(); ?>
<?php else : ?>
	<?php the_excerpt(); ?>
<?php endif; ?>

replace it with:


<?php the_content(); ?>

You might need to remove the read more button. Scroll down, then remove this line:


<a class="read-more" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php _e('Continue reading','west'); ?></a>

Save. Then install and activate your child theme.

If you loose the configurations you’ve done in the customizer (Apperance > Customize), you can use Customizer Export/Import plugin to sync it manually.

I hope this helps.

Regards,
Kharis