Frustration with Yoast SEO Meta Descriptions

Please read the following carefully before responding to the issue in question

The Meta Descriptions for Yoast SEO and Pro have broken… yet again. This is a very frustrating issue that has been going on far too long IMO.

It was thought for some time that this issue had been resolved but it continues to plague this platform. The history of the issue can be read here: https://theme.co/apex/forum/t/yoast-og-description-is-not-being-generated-from-content-in-pro/44012/8

The basic gist of the history is that excerpts are not generated for pages in WP and so a little code needs to be added to functions.php to make that active. No big deal. An explanation of how to do that can be found here: https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/

Now, it was thought that once that is done, the Yoast Snippet Variable “%%excerpt%%” should be able to be used to autogenerate the description from page content just as it normally would if we weren’t using Pro as a page builder. And actually, it does. The problem, I suspect, is that it also strips all shortcode from that excerpt which translates to an empty description.

Now, in my case, the standard format of the meta description as configured in Yoast using their variables is this:
%%Title%% %%Seperator%% %%Exceprt%%

The result in the parsed source code is something like this (lets us the about page on the site in question as an example):
<meta property="og:description" content="About -" />

As you can see, the content correctly displays the Title and Separator but the Excerpt is functionally ignored. What is really going on though is that the content of the excerpt is entirely made up of Cornerstone shortcode and is therefore not printed to the source code. Of course, this makes sense, but it creates a massive problem.

Google has already indexed the site I am talking about and the resulting abstract in google’s SERP is accurate:

Learn More - About - Sharon Jaynes sharonjaynes.com › about
Sharon Jaynes has been encouraging women through ministry for over twenty-five years. From the time she met Christ as a teenager, she fell in love with God’s …

Google had previously picked up the description seen above which, as far as I understand it, was previously present in the parsed source code. It was there because I had implemented the “excerpt for pages” function as described in the history of this case. I am concerned that when Google looks again at the site (or any new sites I build), that the abstract will be stripped down because the meta description no longer exists in full as it once did.

Again, this is what it looks like now:
<meta property="og:description" content="About -" />
See? No description at all. This is not good.

I think there needs to be a serious discussion in your dev team to address these issues that have been ongoing for a very long time… and a final and working solution needs to be implemented right away… once and for all. The “Manual Excerpt” section found in page settings from within the pro builder say “(Optional) Cornerstone will derive an excerpt from any paragraphs in your content. You can override this by crafting your own excerpt here, or within the WordPress post editor.” And, there is the problem. Clearly, this is no longer happening.

You must see that what this means is that every single page ever created in this platform must now be manually audited to see if a description is present and, if not, manually entered as an excerpt or inputted into the Yoast snippet editor on all of the pages ever. In our firm’s case, this represents thousands and thousands of pages. In other words, we just went from having a useable and functionally appropriate default picked up from the actual content of the page and overwritten by Yoast if we want, to the need to manually create descriptions for every piece of content we have ever created and will create using Pro. This would be a massive undertaking and cost a fortune.

please address these concerns asap

Thank you.

Hi @simeoned,

We surely understand your frustration as you have a project with lots of pages and it is very hard to go over all the pages and add the snippets manually to the Yoast plugin option.

Upon reading your description I feel that there is a misunderstanding or maybe I am wrong. The code that you shared with <meta> tag is an Open Graph code and related to Facebook-related code and not Google. I am not an SEO expert but from what I know the Open Graph code is used to show the content when shared via Social Media platforms and it does not have anything to do with Google ranking.

Having said that, the point about the Yoast variables to use for all pages instead of adding them one by one is that indeed Yoast can not detect the rendered HTML code. The reason behind that is that indeed the code which is stored in the database is not HTML and is shortcode-like pseudo code.

It is not possible to store direct HTML for several reasons and this is something that you will see in nearly all Page Builders and it is not specific to our product. Yoast plugin can not interpret the save data as it is the job of the Page Builder and it is the same scenario for all other page builders and unfortunately we can not do anything about that.

We are talking about a very specific case which is using a dynamic feature of Yoast called variables to extract data dynamically. Unfortunately, you can not do that with any other page builder and your best bet is to go to each page and add whatever you want to have as the Google Description manually into the Yoast plugin option.

I do understand that it is a lot of work to do for your website and totally share the frustration. I just want to give the context that it is not possible to force Yoast plugin to interpret page builder data automatically via its dynamic variable feature, and it is the same scenario for all page builders.

Needless to say that we appreciate your feedback and your time to describe your case scenario in detail. Unfortunately, at this point in time, our response is what you already said is a hard thing to do and it is to go over all the pages and add the proper Google related descriptions manually. Again, I want to stress that we do understand that it is a super hard thing to do for your website with that many pages at hand.

Thank you for your understanding.

I contacted one of our developers and he will get back to you to look into the problem and see if there is a way to address the issue or not.

This way we can make sure that we will look into all the possible scenarios for such a case scenario.

Thank you for your understanding and patience.

Hi, @simeoned,

This is systematically fixed on our unreleased version which going to be part of the next update. The issue is because the text content within the cornerstone isn’t exposed from the standard Wordpress hooks. The fixes is by creating an area within page content that stores some SEO data, and that includes the plain text and images. With that fix, the standard the_content and the_excerpt should work in which 3rd party features are dependent (like SEO excerpt/description generation). That also fixes the search issues where some posts/pages won’t display due to the encoding of special characters.

But this fix requires resaving of the existing pages and posts to make sure the cs_content_seo area is created. Old posts and pages will still rely on old excerpt generation until re-saved within the builder.

Thanks!

To be clear, while you may be correct about the opengraph tag I mentioned above, that is just one of two description tags that are generated. There is also another one which is populated by Yoast. The following is taken from the homepage of the same site I’ve been using as an example:

<meta name="description" content="Home -"/>

I’m not specifically worried about the og version so let’s not get bogged down in that minutiae.

The main problem I am having with your answer is that this issue has been noticed before and described in my previous post: https://theme.co/apex/forum/t/yoast-og-description-is-not-being-generated-from-content-in-pro/44012
and it was solved. In other words, adding add_post_type_support( 'page', 'excerpt' ); to functions.php made the meta description work as expected as the %%excerpt%% variable was then referencing something previously unsupported by default in WP. And now, suddenly it no longer does this. This may be due to an update to Pro or Yoast or both… or some other unknown reason. The point is, it does not work now where once it appeared that it did.

Thank you for passing this along to your devs. Please let me know what they say about this because, as I say, this is not about one site. We have about 35+ sites built on your platform with varying levels of content and complexity - some of these sites have 100’s pages. To have to pay someone to deal with this mess would be very cost prohibitive. And to do it ourselves would represent a profound loss of productivity in terms of business operations.

OK, that is a bit more workable. Re-saving the page data is understandable and makes sense given the programatic changes you are describing. This explanation gives me some confidence that this issue might be finally put to bed.

ETA on this release?

Thank you!

Hi, @simeoned,

The intention of adding that fix is to address all excerpt related issues, it’s by giving back the control to Wordpress when it generates its excerpt. With this, the theme or builder doesn’t need a direct integration to 3rd party plugins when it comes to excerpt and description. So yes, it should work once it’s re-saved.

As for adding add_post_type_support( 'page', 'excerpt' );, it’s still a requirement because it’s Wordpress standard not to include excerpt for pages. You would still need to add that code to make sure it works, OR manually add meta description for every page. Please check this https://yoast.com/wordpress/plugins/seo/titles-and-meta-descriptions/

Yoast added that feature considering pages has no excerpt as part of Wordpress standard, you would need to add meta description manually for pages that doesn’t support it, or yes, add that code. And same as them, we can’t include that code just to add excerpt for pages, it’s user preference and they should apply it manually.

As for the ETA, they’re no news as of yet, but there should be once other issues are ironed out. Please stay tuned :slight_smile:

Thanks!

@christopher @rad
Is there a reason this thread might not be visible in the forums any longer? I went to search for the title “Frustration with Yoast SEO Meta Descriptions” and it returned no results. What happened there?

Hi, @simeoned,

We’ll check about the thread’s visibility.

As for the issue, I did more testing related to %%Excerpt%% and it’s because of the SEO Yoast plugin itself. When you don’t use %%Excerpt%%, the system uses the standard get_the_excerpt(), hence, resulting to this which works

<meta property="og:description" content="this is an excerpt" />

It will always work since it uses Wordpress standard for generating excerpts, especially the excerpt hooks.

Now, the problem is when adding %%Excerpt%%, it no longer uses get_the_excerpt(), hence it’s no longer using standard hooks, instead it directly pulls $post->post_content to generates its own excerpt. And it results to this

<meta property="og:description" content="POST TITLE - " />

It’s because the YOAST itself removes the shortcode first before even retrieving the text from post_content. This is the code from their plugin

You see, there are strip_shortcodes() before match replacements %%([^%]+(%%single)?)%%. Please check this as well, https://github.com/Yoast/wordpress-seo/issues/6288. The problem is the priority, it should extract text content first before removing shortcodes, affecting other plugins and builders (not just ours). Another question is, why they won’t use get_the_excerpt() for %%excerpt%% since it’s Wordpress’ standard just like the default?

To confirm this, please follow these

  1. Activate another theme like TwentyNineteen and make sure the cornerstone is inactive (if there is one).

  2. Then add this code to TwentyNineTeen’s functions.php

add_shortcode('this_is_just_a_test', 'this_is_just_a_test');

function this_is_just_a_test ($atts, $content) {
return $content;
}
  1. Now create a post and add this as content
[this_is_just_a_test]
This is a text that should appear on Yoast Excerpt
[/this_is_just_a_test]
  1. Now edit your post meta description and add %%excerpt%%, then view your post source code in the browser and it’s empty.

Though I may add another fix for this, but again, this isn’t a theme and builder’s issue now since it’s properly generating excerpt through get_the_excerpt().

Thanks!

Hi @simeoned,

As an addition to this, it looks like %%excerpt%% support is removed from SEO Yoast, it’s not even on the list here

Another thing is, I’m using a code editor that is able to search through files for specific string such as %%title%%, and there are results here

but none for %%excerpt%%


Then when I tried implementing %%excerpt%% support, it triggers this warning

<b>Warning</b>: count(): Parameter must be an array or an object that implements Countable in <b>..............\wp-includes\post-template.php</b> on line <b>316</b><br />

It’s known issue between PHP 7.2+ and Wordpress, since Wordpress still count() without checking if it is is_countable(), perhaps it’s intentionally removed for now and since 2016. Though, I still implemented the fix on our side by adding this

public function replacements ( $replacements ) {
      
      $replacements['%%excerpt%%'] = get_the_excerpt();

      return $replacements;

  }

But the problem again is the warning, it’s there to stay as of now if you’re fully dependent on %%excerpt%% template.

Thanks!

UPDATE:
Able to fix it by telling Yoast not to strip our cornerstone SEO data, no need for the above fix that cause warnings. Should be available on next updates :slight_smile: Cheers!

@rad

Thanks so much for the update.

I wanted to address the Yoast variables that are available. I know what you mean about %%excerpt%% not being in the list by default when editing the templates they provide within their interface. But it is listed in their documentation found here: https://yoast.com/help/list-available-snippet-variables-yoast-seo/ This is actually how I found out it exists at all when I was troubleshooting the problem on my end months and months ago. Anyway…

So to be clear, you are saying that you are implementing a fix that should make all of these problems go away in your next release? I would very much like to see that happen. Thanks again!

Hi @simeoned,

Yes, it looks like it’s still implemented but just a wild card, hence using its own filter to replace it manually causes more warning and issues. That filter is from them and not from us and we’re only reusing what’s given, or maybe it’s implemented differently now and we’re overlooking on how to properly use its new implementation.

But yes, it’s fixed now and doesn’t need filter or hooks from them, the fix is just making the text visible from SEO Yoast. But again, that would require resaving of the content in the builder since it still has backward compatibility to make sure the old version still works.

Thanks!

And when will the next release which contains this fix be pushed to us?

Hi @simeoned,

There is no ETA at the moment but could be sooner.

Thanks, and please stay tuned.

OK, please check on the visibility of this thread in the forums. It does not show in search results. Other members should have the benefit of this complex case history and understand what they are dealing with from an SEO perspective.

Hello @simeoned,

The thread has been listed and now searchable in the APEX forum search.

Cheers.

@ruenel No, I am afraid it is still not visible in the forum and searching for it does not return any results.

Hello @simeoned,

Yes it is now searchable.

With regards to your issue, please check out the latest update XX 7.2 and Cornerstone 4.2.
Check the changelog here: https://theme.co/changelog/

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.