Skip to content

Static Block in Product Grid with Load More

We want to add a static block to some of our category pages that will take up the first two spots in the product grid. It would look like this finished:

Static block in category page

For testing purposes, I’ve just added a generic li and div tag to the top of the product list.

/app/design/frontend/Theme/default/WeltPixel_CategoryPage/templates/product/list.phtml

<?php $iterator = 1; ?>
    <ol class="products list items product-items">
        <li class="item product product-item author-information" style="width: 48.5% !important;">
            <div class="author-container" style="background-color: #f4f4f4; height: 200px;"></div>
        </li>
        <?php /** @var $_product MagentoCatalogModelProduct */ ?>
        <?php foreach ($_productCollection as $_product): ?>
            <?php /* @escapeNotVerified */
            echo ($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
            <div class="product-item-info" data-container="product-grid">

It renders okish on my local site:

local site with block

We are using the WeltPixel Pearl Theme with its “AJAX Catalog and Infinite Scroll” so a “Load More” button displays at the bottom of the list.

After I’ve clicked the “Load More” button, another one of these static blocks displays. We only want the one at the start of the list.

How do I prevent a second static block from displaying?

load more duplicate block

I also am open to other ways of inserting this content.