WooCommerce: Add Content Below Shop Page Products

By default, the WooCommerce shop page is quite limited when it comes to customization. Unlike standard WordPress pages, the shop page is a special placeholder that automatically outputs your products, so you won’t find a block editor or content area you can easily edit from the dashboard. This can be frustrating if you want to add extra information, promotional text, trust signals, or even a custom call to action beneath the list of products.

The good news is that WooCommerce provides hooks you can use to inject content exactly where you want it — including right below the products on the shop page. With just a small PHP snippet, you can display anything from simple text to HTML, shortcodes, or even dynamic content. In this tutorial, we’ll look at the correct hook for targeting the shop page only, and show you how to safely add content after the product loop.

This is the exact code snippet I’m using on the Checkout Summit shop page to display an image under the products.

PHP Snippet: Add Content At The Bottom Of The WooCommerce Shop Page

This code hooks into woocommerce_after_main_content, which fires right after WooCommerce outputs the product loop. The is_shop() conditional ensures the content is printed only on the main shop page, not on category archives or single products.

Inside the callback, I first add a spacer block for visual breathing room. Then I render a linked image using wp_get_attachment_image(). This function is preferable to hardcoding <img> tags because it automatically pulls in the correct srcset, handles responsive image sizes, and allows passing accessibility and performance attributes like alt, loading, and decoding.

In practice, you can replace the spacer and image with any custom HTML, shortcode, or dynamic logic. Just keep in mind that this hook runs after all products, but still within the main content wrapper, so it’s the perfect place for promotional banners or custom messaging.

/**
 * @snippet       Echo Content After Product Loop @ WooCommerce Shop
 * @tutorial      https://businessbloomer.com/woocommerce-customization
 * @author        Rodolfo Melogli, Business Bloomer
 * @compatible    WooCommerce 10
 * @community     https://businessbloomer.com/club/
 */

add_action( 'woocommerce_after_main_content', 'bbloomer_content_below_shop' );

function bbloomer_content_below_shop() {
    if ( is_shop() ) {
        echo '<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>';
        echo '<figure class="wp-block-image aligncenter size-large no-border"><a href="https://checkoutsummit.com/so-you-liked-one-of-those-quotes/">';
        echo wp_get_attachment_image(
            548,
            'large',
            false,
            array(
				    'loading'   => 'lazy',
				    'decoding'  => 'async',
				    'class'     => 'wp-image-548',
				    'alt'       => 'Keep Calm and Place Order',
            )
        );
        echo '</a></figure>';
    }
}

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *