---
title: "A hack for Yoast SEO in WooCommerce"
description: "The vast majority of WordPress users use Yoast SEO as a plugin to improve the SEO management of their website, but WooCommerce users will have noticed a problem that arises on the Shop page, and it is that the title"
url: https://artprojectgroup.com/hack-for-yoast-seo-in-woocommerce
date: 2014-09-16
modified: 2025-04-25
author: "Art Project Group"
image: https://artprojectgroup.com/wp-content/uploads/2023/04/woocommerce-blog.webp
categories: ["Tutorials"]
tags: ["functions.php", "WooCommerce", "WordPress plugins", "Yoast SEO"]
type: post
lang: en-US
---

# A hack for Yoast SEO in WooCommerce

The vast majority of WordPress users use **Yoast SEO** as a plugin to improve the SEO management of their website, but WooCommerce users will have noticed a problem that arises on the Shop page, and it is that the title of the page is not displayed correctly.

At **APG** we usually use the following structure of variables for the Title Template:

Copy to clipboardSyntax Highlighter%%title%% | %%sitename%%
Which should return the title “*Shop | Art Project Group*“, for example, but, however, for the WooCommerce *Shop* page the first variable appears blank, so, obviously, the title of the page is not displayed correctly: “*| Art Project Group*“.

To solve it we have created this small piece of PHP code which, as always, you must add to the *functions.php* file of your child theme to force *WordPress SEO by Yoast* to display the title of the *Shop* page correctly:

Copy to clipboardSyntax Highlighter//I fix the shop title
function process_the_title( $title ) {
if ( is_shop() ) {
$title = "Shop " . $title;
}

return $title;
}
if ( ! is_admin() ) {
add_filter( 'wpseo_title', 'process_the_title' );
}
In this way the title of the *Shop* page will be displayed correctly.

This PHP code is sure to get you out of more than one tight spot, so we hope you find it useful.
