How To Add Customized Messages and Content to a WooCommerce Shop

- written by

When you build a WooCommerce online store, sometimes the client wants to place a custom message or other content strategically on your shop.

Of course, there are many reasons they might want to place content specific parts of their store, from limited stock messages to updates on sales— and many other unique uses.

And if you can do this all of this, as a builder, with strategically placed messages, supplemented by conditional logic, well, you can imagine the possibilities. That is where the WooCommerce Conditional Content extension comes in.

Adding Unique Messages and Content to Your WooCommerce Online Store

You can create these messages with this extension by using what are called Content Blocks. You will find them under the WooCommerce menu in your dashboard.

content blocks

Creating a Content Block

To add a content block, you will be taken to a custom post type where you can do several things.

adding a new block with custom message

Output Settings: Type and Location

You will have the option to have the content shown once or in a loop. You also have control over where you want the placement of the content or message. There are several options:

WooCommerce – this will place content before and after the main content on the shop page, category pages and single product page.

Shop – this adds content on the shop page, below your title and after the product listings.

Single Product – there are numerous places you can add content on a single product page.

Custom – this allows you to place it anywhere on the site using hooks and filters.

custom output settings

You can also create custom actions using hooks. In their documentation, they have a resource for hooks and filters. This gives you a lot more flexibility with placement. But when using the rules, any rule based on a single product, the hook will only show on the single product page.

custom action in output settings

Content / Message Creation

It’s easy to create custom content or messages using the familiar editor window, which gives you formatting control over the content.

adding custom message

Rules / Conditional Logic

This, of course, is where the real power lies: how and when this content shows up.

rules for your custom message

With any conditional logic or rules, it can be as simple or as complicated as needed. The first rule or rules are based on and. Each rule must be met. We can also add one or more or rules, so content will show not only when something and something else is set, but it will happen if something or something else is set.

add multiple rules

If we look at all the variables you can use in rules, it is obvious that you can fine tune the control of when your content or messages display.

variables for custom message

Just looking at this list, you can imagine the possibilities. Of course, it would be impossible to show every instance where this could be used. But here are a couple of examples:

On Sale, Stock Getting Low

Let’s say I am your client and have a sale on all microphones. But I also want to let customers know that I have limited stock and warn them when I get below five in stock. Though I do have the stock number showing, this lets my customers know that when they are gone, there are no more on sale—and it’s in a prominent spot that will catch their eyes and create urgency.

I would simply create my message and add these three rules as ongoing messages. I can make it bold, italicized and red so it stands out. In addition, I chose this for the single product page, after the product title:

custom message for stock low on sale

Now if I look at a product that is below five remaining in stock, this is what I see:

low stock product with message showing

But if I visit another microphone on sale that isn’t that low in stock, the message doesn’t show.

sale item with no low stock message

Free Shipping on Minimum Purchase

In this example, I am using a simple rule but also am using two separate messages, as I’m offering free shipping on total cart purchases of over $150. I create a second message to let them know they are getting free shipping once their cart has that amount in it.

On placement, I am adding it before the main content so it will show up on the shop page, archives and single product page.

free shipping with minimum spend

We now find it on all the pages. For example, here it is on the shop page.

free shipping message storewide

Once the cart exceeds $150 the message no longer shows.

message hidden after cart exceeds cost for free shipping

Of course I could share a ton more examples, but you can get the idea here. With the variety of rules you have, and the placements, you can get very creative with the WooCommerce Conditional Content extension.

Only the posts on the builder blog here may include affiliate links. If you click on them and make a purchase, I'll get a commission, at no cost to you.