Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Shortcodes not properly parsed in meta description #3360
Any fixes to this? Workarounds? I'm getting the same problem, and the only solution I've seen suggested so far (of manually adjusting the meta snippet on every post) is so daunting, we will have to disable the plugin altogether if there is not a fix soon!
EDIT: Can anyone clarify whether this issue only impacts the PREVIEW of the snippet, as suggested in Issue #3525, suggesting that Google actually ignores the shortcodes as intended when indexing? If it's only the preview, that seems to lessen the severity of this issue from a severe deal-breaker to more of a nuisance.
This was referenced
Jan 19, 2016
I kind of have the opposite issue. Client site (so just had this passed on), optimized "content composer" pages to be green. Most recent update makes "word count zero" and therefore red / amber for most of the posts.
How do we get the word count back, so the SEO score and etc is relevant. Presumably, the content composer content is being ignored?
UPDATE: I am aware this is a different "issue" but wondering if the fix for this one, has blocked off all the content composer text?
Just got an update when the above was posted. I don't think I was clear enough with what I was saying above : it wasn't that you changed the wordcount feature; more that you placed code in to "ignore" shortcodes, and therefore content made with a theme builder (which uses a heap of shortcodes) is now no longer counted by wordcount (it is ignored)...
Now, without knowing your code, I quickly scanned through the changes implemented since it worked, and this one stood out, as a potential cause for why word count which worked before, no longer worked.
Its all a moot point, as my client isn't paying me to troubleshoot this. The wordcount has disappeared and remains disappeared for his content builder, and periodically he moans about the traffic lights.
@silicondales to my knowledge, shortcodes are parsed before the content is analyzed, so our wordcount should be accurate. Or are you talking about the remaining character count for the title and the metadescription? There's a separate issue for that here: #3430
If not, this sounds more like you need technical support. Unfortunately that's something we can only provide to you or your customer if you've bought a premium license.
I read through all the comments, and I see multiple answers from Yoast Members saying that this is fixed and the ticket was closed and multiple sources confirm that it's not fixed.
I can confirm that this is NOT fixed. No shortcode is being parsed in the meta description nor the document title box. The raw shortcode is being output on the front page. Doesn't matter what kind of shortcode, if visual composer or any small custom shortcode that just outputs a hello world. Shortcodes are not being parsed.
This ticket should be open.
Tested on a fresh WordPress installation of 4.6.1 with Yoast SEO 3.70
@kmob2 you are right that we don't parse shortcodes in the metadescription, but that is not what this issue is about. Please allow me to explain.
We only parse shortcodes in the content we sent to our analysis tool. We do this because WordPress parses those on the frontend as well and we want to analyze the content that WordPress outputs on the frontend.
We also use this parsed content for rendering a placeholder metadescription in the Snippet Preview. That placeholder metadescription is not rendered by us on the frontend but only exists to give you an idea of what text Google will probably show in the search result based on the content.
When you explicitly set a metadescription through the snippet editor, this metadescription replaces the placeholder in the preview. In the actual metadescription we don't parse shortcodes because we also don't do that on the frontend. (To my best knowledge we have never parsed shortcodes in the metadescription before).
I can imagine this is confusing and we probably should improve this experience. However, it doesn't really make a lot of sense to parse shortcodes in a piece of text that can only contain about a 140 characters, all the more because the metadescription should be a unique piece of text, aimed at convincing users to click on a search result. As an alternative, we offer a limited set of variables which you can use in the metadescription. Also see https://kb.yoast.com/kb/yoast-wordpress-seo-titles-metas-template-variables/.
@omarreiss, here are my remarks on what was said in your comment.
As far as I understand it, the Yoast SEO plugin is a tool to help, not hinder.
I think it makes complete sense to parse shortcodes in a piece of text that should only contain roughly 140 characters.
Let's rewind back to the reason to parse the shortcode -- some shortcodes modify and alter the content based on a page or a post type condition. They help streamline a user's management of dynamic content that is based on those conditions. They may help only with formatting and markup structure for visual structure on the front end (for example: visual composer shortcodes).
In the end they take the place of content in the snippet editor, and the rating of that content becomes poor, because it's code, and not written content.
Furthermore, the shortcodes, if not parsed, always end up adding bad results to the overall analysis of the site on the admin side. I hate seeing red dots across my post and page listings because the Yoast SEO plugin is analyzing entire blocks of shortcode code and not the content that the shortcode finally outputs on the front-end as it should.
If I have installed Yoast SEO to help me rate my content, even at a glance, and shortcodes code is being read as the code instead of the actual written content that I put on my page, then this Yoast SEO feature becomes useless to me - when I might as well rate things myself without the plugin - which is not what I intended in the first place.
And while I know that the content ultimately gets read parsed by Google crawling the page, I expected the Yoast SEO tool to help me predetermine what that might look like. Back to my first statement of helping and not hindering.
Lastly, yes I always have the opportunity to manually enter content for that snippet editor, but if you have hundreds to thousands of posts (as we do on our websites), that becomes one extra thing to manage for our writers/editors.
Our writers/editors are attempting to crafting the content inside the shortcodes properly for SEO purposes, so they rarely need to customize the Yoast SEO snippet afterwards - its nice to have that feature for different cases, but on the whole a cumulative problem en mass if the shortcodes aren't parsed.
This should be reopened. The problem still exists.
If this is just preview text and shortcodes aren't being used in any way, (what I think is being said above), then the preview text should be changed in some way so this does not look like a mistake to the user by showing shortcodes. Even blank or "no description set" or something would be better.
As the purpose of the preview area is to show how the search engine will display it, showing the shortcodes is wrong because the search engine is not going to show shortcodes as text.
Part of the problem is that the editing interface makes this look like this gibberish code IS the meta description.