• Hi!

    I’m using the Pique theme for my clients website, and he wants to have the featured images that belong to his blog posts displayed on the frontpage.
    Does anybody know how to do this..?

    Every comment on this is highly appreciated! Thanks!

    // Roxanne

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

    If you have your front page set up to display your site’s latest posts, then Pique will automatically display the posts’ featured images.

    To check if your front page is set up to display your latest posts: Navigate to Appearance > Customize in your admin area and then go to the Static Front Page panel. Under “Front page displays” check “Your latest posts” then save your settings.

    If you instead wish to have a Static Front Page set as your home page and are wishing to display the featured images in “Panel 4” (see the theme’s support documentation for a guide on which panel is which) then let me know.

    If possible, please also provide a link to your site so that I can better visualise what you’re trying to achieve.

    Thanks!

    Hi Roxanne,

    After giving your question some further thought and seeing your second forum thread, I believe I may have misunderstood what you’re trying to achieve.

    If you can clarify for me, I’ll be happy to assist further.

    Thread Starter Rnlhellevoort

    (@rnlhellevoort)

    Hi Siobhan,

    Haha sorry, English is obviously not my first language… Trying to explain technical things is a bit hard…

    Uhm yeah, I want my frontpage to be static indeed, and display posts in a panel. I’m totally satisfied with how everything’s set up on the website right now, except for the featured images and meta data for the blog posts.

    I would love to have the featured images that belong to the posts to show up in the panel I set for posts, right above the post title.

    This is the website:
    https://www.patricknederkoorn.nl/

    Hopefully this clears things up!
    Thanks!!

    Hi Roxanne,

    The misunderstanding is completely my fault and I do apologise. Thanks so much for clarifying!

    The first step to achieving what you’re after is to set up a child theme. Once you have set your child theme up, copy the and then duplicate the /components/content-excerpt.php from the parent theme to your child theme’s directory.

    The code in /components/content-excerpt.php defines how the excerpts for your posts look on the front page of the theme.

    Open that file in your child theme and locate the title:

    the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );

    We’re going to insert the_post_thumbnail() function just above the title. You can read more on this function here:

    https://developer.www.ads-software.com/reference/functions/the_post_thumbnail/

    This is how it will look in your /components/content-excerpt.php file:

    <?php
    the_post_thumbnail('full');
    the_title( sprintf( '<h3 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' );
    ?>

    Once you’ve saved that change to your child theme, the post’s featured images should appear above the title on the homepage. Let me know how that goes or if any questions come up.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display featured images of posts’ is closed to new replies.