• Hi,

    Just trying out the new Storefront theme, couple of questions.

    How do I get my blog page to only show excepts, not the full post. I have googled this and reference to index.php is mentioned, but I can’t see the code ?php the_content() anywhere in the files.

    Any help would be great, I don’t want our readers to get all the blog posts on that page.

    Second issue, when you open up a blog post you get the featured image at the top of the posts. Can these be removed?

    Cheers…Gary

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    You can use the <!-- more --> tag to display excerpts on archives. Other than that you’d need to do some customisations. Take a look here for more info: https://docs.woothemes.com/document/display-post-excerpt-instead-of-full-content/

    If you don’t want to display a featured image, then just don’t set one? Either that or plug the storefront_post_content() function in your child theme. Something like:

    function storefront_post_content() {
    		?>
    		<div class="entry-content" itemprop="articleBody">
    		<?php
    		if ( has_post_thumbnail() && ! is_single() ) {
    			the_post_thumbnail( 'full', array( 'itemprop' => 'image' ) );
    		}
    
    		the_content(
    			sprintf(
    				__( 'Continue reading %s', 'storefront' ),
    				'<span class="screen-reader-text">' . get_the_title() . '</span>'
    			)
    		);
    
    		wp_link_pages( array(
    			'before' => '<div class="page-links">' . __( 'Pages:', 'storefront' ),
    			'after'  => '</div>',
    		) );
    		?>
    		</div><!-- .entry-content -->
    		<?php
    	}

    Hi kiwimana,

    If you don’t want some code customization on your theme files, we suggest using this plugin we’ve created: https://www.ads-software.com/plugins/storefront-blog-excerpt/

    Hope this works for you.

    Thread Starter kiwimana

    (@kiwimana)

    Thanks guys for the help, went with the code option that James mentioned.

    Now trying to get the featured image to not appear at the top of each post. As we have already put that there in the code. Not crazy about editing 400 posts ??

    Thanks…Gary

    The featured image is loaded here:

    if ( has_post_thumbnail() && ! is_single() ) {
    			the_post_thumbnail( 'full', array( 'itemprop' => 'image' ) );
    		}

    Remove that and it’s gone ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Except only on blog posts?’ is closed to new replies.