{%- if request.path == '/blogs/all' -%}
<style>
#showmenu_3,#showmenu_4,#showmenu_5,#showmenu_6{display:block!important}
#showmenu_2,#showmenu_8,#showmenu_9{display:none!important}
</style>
{%- elsif request.path == '/blogs/sex-psychology' -%}
<style>
#showmenu_3,#showmenu_4,#showmenu_5,#showmenu_6{display:block!important}
#showmenu_2,#showmenu_8,#showmenu_9{display:none!important}
</style>
{%- endif -%}
判断首页
{%- if request.page_type == 'index' -%}
{% assign potential_action_target = request.origin | append: routes.search_url | append: "?q={search_term_string}" %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": {{ shop.name | json }},
"potentialAction": {
"@type": "SearchAction",
"target": {{ potential_action_target | json }},
"query-input": "required name=search_term_string"
},
"url": {{ request.origin | append: page.url | json }}
}
</script>
{%- endif -%}