显示与特定标签的相关博客文章,博客包含的内容 - shopify
显示博客文章具有博客拥有的特定标签 - 例如Shopify
,例如,如果博客包含标签素食主义者,并且需要显示包含标签素食主义者的相关博客,
如果博客的标签是标签是带有鸡蛋标签的鸡蛋秀与鸡蛋标签相关的博客。
现在,我的代码现在显示了网站上所有博客的相关博客,即使标签不匹配或不适用该博客。这是带有标签的博客tinyurl.com/294769GB
<div class="wrapper">
<h4 style="margin-left: 1%;">Related Recipes</h4>
<div class="res">
{% for article in blogs.Recipes.articles limit:8 %}
{% if article.tags contains 'Vegan' %}
<div class="njohn_search_otherpage">
<a href="{{ article.url }}" title="{{ article.title | escape }}">
<div class="crop">{{ article.image.src | img_url: 'medium' | img_tag: article.title }}</div>
<div>{{ article.title }}</div> </a> </div>
{% endif %}
{% endfor %}
</div>
</div>
Display blog posts with a specific tag that blogs have - Shopify
For example, if the blog contains the tag Vegan, and needs to show related blogs that contain the tag Vegan,
if the blog has the tag is egg show related blogs with egg tag.
now my code now shows the same related blogs for all the blogs on the website, even if the tag doesn't match or is not applied to that blog. here is the blog with tags tinyurl.com/294769gb
<div class="wrapper">
<h4 style="margin-left: 1%;">Related Recipes</h4>
<div class="res">
{% for article in blogs.Recipes.articles limit:8 %}
{% if article.tags contains 'Vegan' %}
<div class="njohn_search_otherpage">
<a href="{{ article.url }}" title="{{ article.title | escape }}">
<div class="crop">{{ article.image.src | img_url: 'medium' | img_tag: article.title }}</div>
<div>{{ article.title }}</div> </a> </div>
{% endif %}
{% endfor %}
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论