How to display blog posts with featured images on magento homepage?

How to display blog posts with featured images on magento homepage?

September 9, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to display blog posts with featured images on magento homepage?

Displaying WordPress Blog Posts with Featured Images on Magento Homepage

Are you looking to integrate your WordPress blog seamlessly into your Magento e-commerce site? The FishBig extension is an excellent tool for this purpose. Once properly configured, it allows you to display your WordPress content within your Magento theme.

However, you might be wondering how to specifically extract and display key information like post name, publish date, featured image, and link from the integrated posts on your Magento homepage. This requires a bit of customization in both WordPress and Magento.

Step 1: Ensure Featured Images are Set

In WordPress, make sure you have set a featured image for each blog post that you want to display. To do this:

  • Open the post editor.
  • Click on “Set featured image”.
  • Upload or select an existing image from your media library.
  • Click “Use as featured image”.

This will associate the chosen image with the specific post.

Step 2: Accessing Post Data in Magento

FishBig allows you to access WordPress post data within your Magento templates. You can use the FishBig helper functions to retrieve this information.

In your Magento template file (usually located under app/design/frontend/default/your-theme/templates/cms-page.phtml):

<?php echo $this->getLayout()->createBlock('fbg_blog')->getPosts() ?>

This will return an array of posts. To access the post details:

<?php foreach ($posts as $post) : ?>
    <div class="post">
        <h2><?php echo $post['post_name'] ?></h2>
        <p>Published: <?php echo date('F jS, Y', strtotime($post['post_date'])) ?></p>
        <img src="<?php echo $post['post_thumbnail_url'] ?>" alt="<?php echo $post['post_title'] ?>">
        <a href="<?php echo $post['post_link'] ?>">Read More</a>
    </div>
<?php endforeach; ?>

This code will loop through each post and display the post name, publication date, featured image (using the thumbnail URL), and a link to the full post.

Step 3: Displaying as Slides

To display these posts in a slide format on your homepage:

  1. Create a new CMS page or update an existing one.
  2. In the content field, add the following block type:
    • Type: FishBig Blog
    • Block Title: Your Slide Title
    • Limit Posts: Set to the number of slides you want.

This will create a slide show of your featured blog posts on the CMS page.

Conclusion

Integrating WordPress and Magento with extensions like FishBig opens up new possibilities for content management. By following these steps, you can easily display your latest blog posts with featured images directly on your Magento homepage.

Remember to always keep your extensions updated and follow best security practices when working with third-party integrations. If you need further assistance or customization options, don’t hesitate to reach out to our expert team at Laravel Company.

Extensions Themes Configuration CLI

Our network