• Resolved Fabi Neves

    (@fabineves)


    Hello,

    I just read all the theme documentation. I was trying to find how to show only the excerpt in home page. I just found the opposite (Display full posts on front page only) and this is not I wanted.

    I tried something, but I’m not very good at coding.

    Also, how can I remove the featured image from single pages?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Tomas Mackevicius

    (@tomasm)

    To achieve first task, just use MORE tag in the Post editor.

    Second question was recently asked, please look at other questions in this forum.

    Thread Starter Fabi Neves

    (@fabineves)

    Ok, but if I want to use the theme in a blog with more than 500 posts. I have to edit one by one?

    Thanks for your help.

    Theme Author Tomas Mackevicius

    (@tomasm)

    Personally I prefer MORE tag method as you will get the most consistent results with it – you chose the exact place where you will cut the article. With automatic excerpts sometimes you get funky results, as it counts the words (I guess the default is 25 words) where to cut the post. So if your post is very short or you have picture at the top, then you may have different outcomes.

    You have to copy template-parts\content.php to your child theme and then edit it a bit:

    <?php if ( is_search() ) : ?>
    
    	<?php tinyframework_excerpt(); // Function located in: inc/template-tags.php ?>
    
    <?php else : ?>
    
    	<div class="entry-content" itemprop="articleBody">
    
    		<?php
    		// Functions located in: inc/template-tags.php
    			tinyframework_post_content();
    			tinyframework_post_pages_nav();
    		?>
    
    	</div><!-- .entry-content -->
    
    <?php endif; ?>
    

    and change it to:

    <?php if ( is_search() ) : ?>
    
    	<?php tinyframework_excerpt(); // Function located in: inc/template-tags.php ?>
    
    <?php else : ?>
    
    	<?php tinyframework_excerpt(); // Function located in: inc/template-tags.php ?>
    
    <?php endif; ?>
    

    You will also have to look at child theme’s section to fine tune the word count:

    2.5 – Control the length of Excerpts (number of words).

    Thread Starter Fabi Neves

    (@fabineves)

    Thank you! It was really helpful!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show Excerpt in home page’ is closed to new replies.