How to add text below WooCommerce category thumbnails

This is how to add text below WooCommerce category thumbnails in the Product category pages. And not just a line or two, but several paragraphs of text. The ultimate aim is to overcome the ‘thin content’ on category pages.

To illustrate, here is the navigation menu on a WooCommerce site. I wanted to put content in the Greeting Cards category page, in the Occasions and Ranges category pages, and in all the sub-category pages.

how to add text below WooCommerce category thumbnails in the Product category pages. And not just a line or two, but several paragraphs of text, illustrated with a drop-down navigation menu highlighting categories

As a side note, I already posted this article – ‘Non Clickable Menu Items‘ – about stopping visitors clicking on and seeing the main category pages. That solves the problem of what visitors see, but it only stops the main category pages from being clicked on. It doesn’t hide the pages themselves and it doesn’t stop Google crawling them and seeing thin content.

I don’t want to display the additional content above the thumbnails

I knew that I could display text above the product thumbnails on the category page by entering it in the Description field for the Product category.

By the way, there is a note below the Description field that says “The description is not prominent by default; however, some themes may show it.” That’s a note from WordPress, so any webmaster who goes into the back end to add that note sees it.

I am using Generate Press theme, and text I enter into the Description field does show on the front end. So I could add text into the Description field and it would show on the front end.

However, it is not suitable for displaying several paragraphs because it pushes the product thumbnails down the page.

And I don’t want visitors who are looking for product images to. have to scroll down past two or three paragraphs of text to get to the images.

I worked out that the hook that I wanted to hook into was woocommerce_after_shop_loop. And after some investigation I thought that Advanced Custom Fields would work to add an additional WYSIWYG editor to the product category.

Using Advanced Custom Fields to add a text field

So I created a field group with ACF with Show this field if the taxonomy is equal to Category (product_cat) and it is showed up in the right place. in the back end. But that didn’t mean it would display on the front end. That needed a snippet of code.

From a post on Contadodigital I worked out what code to use to add an action into the ‘woocommerce_after_shop_loop’ hook

function action_woocommerce_after_shop_loop() {
$term_id = get_queried_object()->term_id;
$post_id = 'product_cat_'.$term_id;
$custom_field = get_field('description_below_product_category_thumbnails', $post_id); // My Advanced Custom Field Variable
echo $custom_field;
};
add_action( 'woocommerce_after_shop_loop', 'action_woocommerce_after_shop_loop', 10, 2 );

Yoast doesn’t recognise the additional text

I have the Yoast SEO and the Yoast WooCommerce plugins installed. They cannot see the additional text. What I needed was something to bridge the gap, and that is what the ACF Content Analysis for Yoast SEO plugin does. It ensures that Yoast SEO analyzes all ACF content including Flexible Content and Repeaters.

The plugin is a cooperation between the people at AngryCreative and Team Yoast, so that seemed like a good bet for reliability.

And that is it.

When Not To Fix Google Warnings

I got an email from Google Search Console today about one of my sites. Specifically, the message said that it was warning me that Search Console had identified that the site was affected by a Product issue. That made sense because the site in question is a WooCommerce site, so it has products.

The email explained that warnings are suggestions for improvement. It continued that some warnings can affect the appearance of the site on Search, and that some might be reclassified as errors in the future.

This is the warning that Google gave about my site: Missing field “priceValidUntil”

The email concluded by recommending that I fix the issue when possible to enable the best experience and coverage in Google Search.

Google Is Your Friend, So I Used It

Having had this kind of message before where it turned out to be much ado about nothing, I googled Missing field “priceValidUntil”

I found this answer to the question that someone asked, that I think is solid information.

Perhaps worth remembering these are warnings, not requirements. Think of it as a heads up for things to add if appropriate for your situation. I do get that instinctively something saying warning is a little daunting! But if you don’t have an expiration date, don’t be tempted to fake one just to clear a heads-up warning. Keep your data accurate, and use the field if and when it becomes appropriate, like if a product went on sale, i.e. 10% off until June 10th, you could then add the priceValidUntil for that, then remove it when it’s gone back to normal. Rule of thumb with structured data is be accurate & truthful. If a particular field isn’t valid for your site, don’t be tempted to fudge it. Just leave it. There are some things that are required, they would generate a red error as opposed to the amber warning.

I didn’t have any products on sale, nor had any products been on sale. Therefore priceValidUntil didn’t apply. Therefore, do nothing.

I wonder though what triggered the Google warning?

Themes For WooCommerce

At first sight you might think that most WordPress themes would work with WooCommerce, and to some extent it is true. And for those themes that don’t support WooCommerce, there is a snippet of code you can add to make the theme work.

But ‘working’ and working well and looking good are not the same. Some themes impose rules baked into their code that dictates how images will be presented. And that might not suit you at all. Be aware of that. The themes here should be OK.

The Themes

Just a not that I’ll add more themes to this post as I try more of them.

Slush by ZigzagPress (Genesis child theme)

Minimalist. light theme with good use of white space. Nothing wrong with it, but for my taste it lacks presence in the header area.

Uku from ElmaStudio

A lovely theme with nice typography and use of white space, elegant. It only allows three products images across in the archive pages, but using the WooCommerce Product Archive Customiser by James Koster (in the WordPress Repository) it will render four across.

However, it then needs some CSS to deal with the display on mobile. A future version of Uku might have more archive column options built in.

Ascend from Kadence Themes

Lots of options with a couple plugins from Kadence, but I found it very slow to respond in the Customiser. It has more options than I got around to using. I might try it again at some point to see what it can do.

Sullivan by Anders Norén

Perfectly OK from a functional point of view, but not enough visual attraction built in to attract me to it.

Generate Press by Tom Usborne

The free version is too plain for my taste. The premium version (very good value for what it offers) has a number of pre-built options in the site library, including an ever-growing number of WooCommerce options.

It also has some video walk-throughs for customising the site with the premium options.

I tried the premium version and like it so much that I am now using it for my sites, including this one. And I am also using it for my WooCommerce sites. The options for WooCommerce built into the back end are a joy.

For example, with one click you can show the Add To Cart buttons on the catalogue pages, or turn them off. That’s just one example: there are many option built in. And yet for all that the theme is lightweight and fast.

It makes it easy to do the things a shop owner might want to do to get their shop the way they want.

WooCommerce sites are naturally going to be heavier in terms of images than a blog that is purely text. Yet with all that, I am still getting 96% (that’s excellent in anyone’s book) for the page speed.

Either Offers Review Or aggregateRating Should Be Specified

On a WooCommerce site I was getting a message in Google Search Console that:

Either “offers”, “review”, or “aggregateRating” should be specified.

I ran a product page through Google’s structured data testing tool. It didn’t throw up an error (except for ‘brand’), but I have seen that before.

That was odd, because surely the tool should show the error if the Search Console reported it.

I am using Yoast SEO and Yoast SEO: WooCommerce.

I asked on a forum I am in, and the majority opinion was to ignore it, but I decided to ask Yoast Support and explained that I don’t have reviews on that particular site, and Support replied:

Thanks for getting back to us. If your site does not have or need reviews, please feel free to ignore these recommendations from the Google Structured Data Tool. These are just recommendations and not actual errors that will affect your site’s ranking. 

In fact, the structured data tool does not throw up the error. It is the Search Console that does – but I am going to call it a day and leave the site as it is.

Clear Cache For Visitors

I saw this recommended as a solution in a post in the WooCommerce Help and Share group on FaceBook.

You may have a caching system like LiteSpeed Cache that will clear the cache each time a page or post is changed. If it is connected to a CDN such as CloudFlare it will also clear the cache there.

But if you don’t have that system enabled and you want to be nice to your visitors (especially if you are running an eCommerce shop), then look at the reBusted plugin in the WP repository.

It promises to save you having to ask “Have you emptied your cache?” when customers run into problems or visitors tell you they are not seeing what you are seeing.

It says it is safe to leave running on live sites; only refreshes browser cache for a file if it has been modified; and doesn’t require any configuration.

It is built by Simon Prosser who is part of the BeaverBuilder team, a WordPress core contributor, and part of the Theme Review team, which are good recommendations.

Headless Ecommerce

I believe in having your own corner of the web – a blog or whatever that is yours. And if you are running e-commerce, I believe in having control of the application that is running it, such as WooCommerce. I know there are arguments for SAAS (software as a service) and if I was starting with a new venture I might just test it out with one of those offerings.

Either way, there is still a lot to say that cuts across both self-hosted and SAAS.

I just watched a WordPress TV episode from Tracey Wallace from BigCommerce speak on five e-commerce trends to implement now – and she talks about headless e-commerce. That is something I have looked at before: It’s a site that front ends a SAAS e-commerce back end from something like BigCommerce or Shopify. The point she makes is that freeing up the front end from the e-commerce application gives site owners more leeway to design the user experience.

She shows off some great sites – like Jeni’s ice cream and others, that are super eye-catching.