Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am running into the problem, where blog tags are creating issue with duplicate meta descriptions. It looks like all blog tags have the same meta description? Is there a way to either change individual blog tag description, or hide tags from being indexed? Please help!
This is not what I am referring to. I am not talking about meta tags for blog posts. I am referring to meta description and titles for the actual tags, that you add for each blog posts.
Hi Oliv,
That is a bit strange. Would you mind sharing a link to your site? The tags are only supposed to be added as meta keywords and not have their own content.
No, the tags are added as actual pages. Here is one example: https://appliedspeed.com/blogs/tech/tagged/afco-racing
Hi, so I have been playing around with this and the tags use your default blog.liquid template to create the page. So all items in the "tech" blog category will have the same meta description.
I was able to come up with some sort of solution for this. I altered the code in the theme.liquid
from this:
{% if page_description %} <meta name="description" content="{{ page_description | escape }}"> {% endif %}
to this:
{% if page_description != blank and blog.tags == blank %}
<meta name="description" content="{{ page_description | escape }}">
{% elsif blog.tags != blank and page_description == blank %}
{% for article in blog.articles %}
<meta name="description" content="{{ article.excerpt | truncate: '150' }}">
{% endfor %}
{% else %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
You can copy this code and replace it inside your theme.liquid
What this does it checks whether or not the blog has tags and if it has tags, it creates a meta description from the filtered articles excerpts.
Please let me know if this resolves your issue.
Unfortunately, that code didn't work.
im having this same problem, did you ever find a solution?
Here's my solution for the same issue that will only change the meta on those tag pages - in theme.liquid replace:
if page_description %}
<meta name="description" content="{{ page_description | escape }}" />
{% endif %}
with the following:
{% if template == 'blog' and current_tags != blank %}
<meta name="description" content="COMPANY NAME blogs tagged with {{ current_tags.first }}.">
{% elsif page_description %}
<meta name="description" content="{{ page_description | escape }}" />
{% endif %}
This gives you a unique meta description for those tag pages but leaves the meta description as is for the actual blog pages.
Hope that helps! 🙂
Where would I find this code on the minimal theme, as I am having the same problem but this code doesn't exist in my liquid file on minimal.
Any help would be much appreciated.
Jenny
Thank you! We had the same issue and this worked like a charm for us.
This is helpful unless there are multiple pages of blog posts, then it continues to duplicate the title. For example
Thank you!!
Hey Friend,
Had the same issue and here is the solution:
Go to the links that have that /tagged content
(in your case https://appliedspeed.com/blogs/tech/tagged/afco-racing)
Then for each article that's on that link, go to the individual blog post, and remove the tags.
When you create a tag on a blog post, it creates a duplicate /tagged page with the same metadata as the blog itself, causing an SEO issue.
In your case: Open this blog post: "The best way to improve power of a supercharged camaro or mustang" and on the right just remove the tags that you have. Should fix the issue.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024