/ โ† Meta Tag Fixes / Yoast and Rank Math Descriptions
In this guide
  1. What not working usually means
  2. How to find the source of each tag
  3. The common causes
  4. Where each description is set
  5. Fixing it in code when settings are not enough
  6. Headless sites and page builders
  7. The fix, step by step
  8. Edge cases worth knowing
  9. Keeping descriptions working
  10. Questions and answers

What not working usually means

When people say their Yoast or Rank Math description is not working, they usually mean one of four things. The first three are problems on the site and can be fixed. The fourth is Google's choice and is covered in why your meta description is not showing in Google.

What you seeWhere the problem is
The page source has no description tag at allThe plugin's output is not reaching the page
The page source has two description tagsThe theme or another plugin is printing a second one
The source has an old or different descriptionA cache, the wrong settings screen, or a template variable
The source is right, but Google shows other textGoogle chose page text for that search

So the first job is always to look at the HTML the live page sends. The plugin's editor preview only shows what the plugin intends to print. It cannot tell you whether the theme, a cache or another plugin changed the result.

How to find the source of each tag

Open the live page in a private window, so you are not logged in, and view the source. Search for name="description". Then look at the lines around it. Both plugins wrap their output in HTML comments that name the plugin, so you can see at a glance which tags belong to them. Yoast's block starts with a comment naming Yoast SEO and its version and ends with a closing <!-- / Yoast SEO plugin. --> comment. Rank Math's block starts with a comment naming Rank Math and ends with <!-- /Rank Math WordPress SEO plugin -->.

From the command line, this shows every description tag and every plugin comment in order:

curl -s https://www.example.com/services/ \
  | grep -inE 'name="description"|yoast seo|rank math'
What the output showsWhat it means
One tag, inside the plugin commentsThe plugin is working. Any remaining issue is cache or Google
One tag inside the plugin comments, one outsideThe tag outside comes from the theme or another plugin
Plugin comments with no description tag between themThe description field and the template are both empty
No plugin comments at allThe theme does not call wp_head, or a cache serves old HTML
Comments from both Yoast and Rank MathTwo SEO plugins are active

If a tag outside the comments remains a mystery, switch briefly to a default theme such as Twenty Twenty-Five on a staging copy and check again. If the extra tag disappears, it came from the theme. If not, deactivate other plugins one at a time. On a live site, use a staging copy or a plugin that switches theme only for logged-in administrators.

๐Ÿ’ก Our meta tag analyser reports every description tag it finds on a page, with its position in the head, so you can spot a second tag without reading the source by hand.

The common causes

The theme does not call wp_head

SEO plugins print their tags through the wp_head hook. A classic theme must call it in header.php, just before the closing head tag. Block themes handle this automatically. Old or custom-built themes sometimes leave it out, and then no plugin can add anything to the head.

    <?php wp_head(); ?>
</head>

A description hard-coded in the theme

Older themes and ones copied from a template often have a line like this in header.php, which prints the same text on every page:

<meta name="description" content="<?php bloginfo('description'); ?>">

It prints the site tagline as a description on every page, in addition to the plugin's tag. Remove it in a child theme copy of header.php, so a theme update does not bring it back.

Theme SEO settings or a second plugin

Some themes and page builders include their own SEO fields. Divi, for example, has description options under its theme options, and some all-in-one performance or schema plugins add meta tags too. Running Yoast and Rank Math together is the most obvious version of this. Keep one source for descriptions and switch the others off.

wp plugin list --status=active --field=name | grep -iE 'seo|yoast|rank|schema'

Caching

Page caching plugins such as WP Rocket, LiteSpeed Cache or W3 Total Cache, server caches in Plesk or nginx, and CDNs such as Cloudflare all keep serving the HTML they stored before your change. Purge each layer after editing descriptions, then fetch the page again with curl to confirm the new text arrives.

Where each description is set

Many cases of the wrong description turn out to be the right description set in the wrong place. Both plugins have three levels: the individual post, page or term; a default template for each content type; and site-wide home page settings.

PageYoastRank Math
A single post or pageMeta description field in the Yoast box or sidebar on that pageEdit Snippet in the Rank Math sidebar on that page
Home page showing latest postsHomepage section of Yoast SEO settingsTitles & Meta, Homepage
Home page set to a static pageThe meta description field on that page itselfThe snippet editor on that page itself
Default for posts, pages or productsContent types section of Yoast SEO settingsTitles & Meta, then the post type
Categories and tagsThe Yoast box on the term edit screen, or the taxonomy templateThe Rank Math box on the term edit screen, or the taxonomy template
WooCommerce shop pageThe shop page's own fieldThe shop page's own field

Check Settings, Reading in WordPress to see whether your home page is a static page or a list of latest posts. Editing the wrong one of these is a very common reason a home page description refuses to change.

Template variables that print nothing useful

Default templates use variables, such as %%excerpt%% in Yoast or %excerpt% in Rank Math. Both plugins try to build an excerpt from the content when there is none, but this can produce nothing or a jumble when the page is built with a page builder whose content sits in shortcodes or blocks. Yoast's %%excerpt_only%% uses only a hand-written excerpt and prints nothing if there is none. If a template produces an empty result, no tag is printed. For your important pages, write the description by hand rather than relying on the template. The broader WordPress picture is in fixing meta tags on WordPress.

Fixing it in code when settings are not enough

If you cannot remove a hard-coded tag through settings, do it in a child theme or a small site-specific plugin rather than editing the parent theme. To change what the SEO plugin prints for particular pages, both plugins provide filters:

// Yoast: change the description on product archive pages
add_filter( 'wpseo_metadesc', function ( $desc ) {
    if ( is_post_type_archive( 'product' ) ) {
        return 'Hand-made oak furniture, built to order in the UK and delivered free.';
    }
    return $desc;
} );

// Rank Math: the equivalent filter
add_filter( 'rank_math/frontend/description', function ( $desc ) {
    if ( is_post_type_archive( 'product' ) ) {
        return 'Hand-made oak furniture, built to order in the UK and delivered free.';
    }
    return $desc;
} );

Use only the filter for the plugin you run. After adding code, purge caches and check the source again. If the description still does not change, the tag you are looking at is not coming from the plugin at all.

โš ๏ธ Edit theme files through a child theme and keep a backup. A typing error in functions.php can take the whole site down, so test on staging first or have file access ready to undo it.

Headless sites and page builders

If your front end is built separately from WordPress, for example with Next.js reading content through the REST API, the plugin's tags never reach visitors unless the front end prints them. Yoast adds a yoast_head_json field to REST API responses for posts and pages. Rank Math offers a head endpoint once headless support is switched on in its settings. Your front end has to read one of these and output the description in its own head. See meta tags in Next.js for the front-end side.

curl -s "https://cms.example.com/wp-json/wp/v2/pages?slug=services" \
  | grep -o '"description":"[^"]*"' | head -1

Page builders such as Elementor normally work fine with either plugin, because they leave the head to WordPress. Problems arise when a builder's theme or template kit adds its own SEO features, or when a custom header template is built without the standard head output. The same view-source check finds both.

The fix, step by step

Step 1

View the live source

Open the page in a private window, view the source and search for name="description". Count the tags and note whether each sits inside the Yoast or Rank Math comments. Run the same check with curl to rule out your browser cache. One tag inside the plugin comments means the plugin works; two tags, no tag, or no plugin comments at all tell you which of the following steps to take next.

Step 2

Remove duplicate SEO sources

List active plugins in the dashboard or with wp plugin list --status=active, and keep only one SEO plugin. Switch off description features in the theme options, such as Divi's SEO settings, and in any schema or performance plugin that adds meta tags. Purge caches and view the source again. You should now see one description tag, inside the remaining plugin's comments, with nothing similar outside them.

Step 3

Remove hard-coded tags

If a description tag still appears outside the plugin comments, open the theme's header.php and search for name="description". Copy the file into a child theme and delete the line there, so updates do not restore it. If the theme has no such line, test with a default theme on staging to confirm the source. Check the source again; only the plugin's tag should remain.

Step 4

Check wp_head is called

If the plugin comments are missing completely, check the active theme's header.php contains wp_head() just before the closing head tag, and add it in a child theme if not. Also check that no custom header template in a page builder replaces the standard head. Reload the page source after purging caches, and confirm the Yoast or Rank Math comment block now appears in the head.

Step 5

Edit the right setting

Check Settings, Reading to see whether your home page is a static page or a list of posts. For a static page, edit the description on that page; for latest posts, use the home page section of your plugin's settings. For other pages, check whether the field on the page is filled or a content type template is being used. Save, purge caches and check the source shows the new text.

Step 6

Fix empty template variables

If the plugin comments appear with no description inside, the page field is empty and the template returned nothing. Open the content type template in the plugin settings and check which variables it uses, such as %%excerpt%% or %excerpt%. Write a description by hand on each important page, and set a sensible template for the rest. Check the source to confirm a tag now prints.

Step 7

Purge every cache

Clear the page caching plugin, any server cache in Plesk or nginx, and your CDN, including separate mobile caches if you use them. Then run curl against the page and confirm the new description appears in the response. If the old text persists after purging, check the cache plugin for excluded pages or a long cache time, and check whether a CDN rule caches HTML for longer than you expect.

Step 8

Confirm with Google

In Search Console, inspect the URL, run Test live URL and view the tested page's HTML. Confirm one description tag appears with your text. Choose Request indexing. The snippet in search results will only change after Google recrawls the page, which can take days or weeks, and Google may still choose page text for some searches. Check again with your main search phrase after two to three weeks.

Edge cases worth knowing

Keeping descriptions working

If many pages end up with the same description, follow fixing duplicate meta descriptions.

Questions and answers

1. Why is my Yoast meta description not showing?

Your Yoast meta description is usually not showing because the theme prints its own description, a cache is serving old HTML, or the description was set in the wrong place, such as the page rather than the home page settings. View the live source and search for the description tag. If there is one inside the Yoast comments, Yoast is working and any difference in Google is Google's own choice of snippet, which only changes after a recrawl.

2. Why does my Rank Math description not change?

A Rank Math description that does not change is most often held back by a page cache, a server cache or a CDN still serving the old page. Purge each one after saving, then check the source with curl. If the source is still wrong, check whether the theme adds its own tag, whether the home page uses the Titles and Meta settings or the page itself, and whether another plugin is printing a second description.

3. Can I use Yoast and Rank Math at the same time?

No, you should not run Yoast and Rank Math at the same time. Both print a description, title, canonical and other tags, so you end up with duplicates and Google may pick the wrong one. Choose one, use its import tool to bring across settings and per-page descriptions from the other, then deactivate and delete the one you are not keeping. Check the page source afterwards to confirm only one set of tags remains.

4. Why are there two meta descriptions on my WordPress page?

Two meta descriptions usually mean the theme and the SEO plugin are both printing one. Many older themes hard-code a description in header.php, and some themes and page builders have their own SEO settings. Read the comments around each tag in the source: the one inside the Yoast or Rank Math comments is the plugin's. Remove the other in a child theme, or switch off the theme's SEO option, then purge caches and check again.

5. How do I set the home page meta description in Yoast or Rank Math?

Where you set the home page meta description depends on what your home page shows. Check Settings, Reading in WordPress. If it shows your latest posts, set the description in the home page section of the plugin's settings. If it is a static page, edit that page and set the description in the plugin's box or sidebar on it. Editing the other location has no effect, which is a very common source of confusion.

6. Why does the Yoast excerpt variable print nothing?

The excerpt variable prints nothing when the page has no hand-written excerpt and the plugin cannot build one from the content, which often happens with page builders that store content in shortcodes or custom blocks. Yoast also has an excerpt-only variable that never auto-generates text. If the whole template returns empty, no description tag is printed. Write descriptions by hand on important pages, and check the page source to confirm a tag appears.

7. Do Yoast and Rank Math descriptions work on headless WordPress?

Yoast and Rank Math descriptions only work on a headless site if the front end reads them and prints them. The plugins generate the tags inside WordPress, but a separate front end, such as one built with Next.js, has its own head. Yoast exposes its tags in a field in the REST API, and Rank Math offers a head endpoint once headless support is switched on. Your front end must fetch one of these and output the description.

Find every description tag on your page

Our meta tag analyser reads the live HTML and lists every description tag with its length and position, so a duplicate from the theme or a missing plugin tag shows up straight away.

Open Meta Tag Fixes โ†’
๐Ÿ’ฌ Got a problem?
Related Guides: All Meta Tag Fixes  ·  How to Fix Meta Tags on WordPress  ·  Why Is My Meta Description Not Showing in Google  ·  How to Fix Duplicate Meta Descriptions  ·  How to Fix Meta Descriptions  ·  Learning Hub

About aiwebpageseo

aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical SEO tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.