• Hello,

    I have build a website with Serene that only links to five posts. Each single post has been formatted but the homepage that shows a preview of all six posts completely ignores the formatting and cuts off the text with a link (“read more”) at a random point.

    I am new to WordPress and don’t know PHP. I would like to either find a way of formatting the previews too or set my first post as a homepage and have that page showing previews of all posts never show up.

    This is what the index.php looks like:

    <?php
    /**
     * @package Serene
     * @since Serene 1.0
     */
    
    get_header();
    
    if ( have_posts() ) : ?>
    
    <div id="main-content">
    
    <?php
    	while ( have_posts() ) : the_post();
    		get_template_part( 'content', get_post_format() );
    	endwhile; ?>
    
    </div> <!-- #main-content -->
    
    <?php
    	get_template_part( 'includes/navigation', 'index' );
    else:
    	get_template_part( 'includes/no-results', 'index' );
    endif;
    
    get_footer(); ?>

    I understand that I can delete the middle part. What do I insert instead of xyz to show a specific post? Help much apprechiated!

    <?php
    /**
     * @package Serene
     * @since Serene 1.0
     */
    
    get_header();
    
    xyz
    
    get_footer(); ?>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    The theme shows excerpts on the home page by default. You can enable the full post content to be displayed in:
    Appearance>>Customize>>Theme Settings>>Display full content of posts on index pages

    Cheers!

    Thread Starter furioso

    (@furioso)

    Oh, perfect – thank you. I did not see that option. That will do as a solution.

    There is only one thing I notice: The image header (when the post is a “gallery” post) is also shown as a gallery with a thumbnail — can that be avoided?

    You can use CSS to hide the gallery in your post listings. The following plugin will allow you to add custom CSS easily without having to create a child theme:

    https://wordpress.org/plugins/simple-custom-css/

    Here is the CSS that will take care of it for you:

    .archive .format-gallery .gallery,
    .blog .format-gallery .gallery {
    display: none;
    }

    Let me know if you have any questions.

    Best Regards,
    Dustin

    Thread Starter furioso

    (@furioso)

    That also works perfectly, thank you a lot for your help Dustin! Much appreciated.

    You’re welcome 🙂

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Homepage Previews’ is closed to new replies.