Shopify themes, liquid, logos, and UX
On the main blog page only, I would like to make the main blog page Title which is "Personal Finance Blog" a link to the main blog page which is: https://www.buyexceltemplates.com/blogs/personal-finance
Below is the code I found in the "main-blog.liquid" file that I would like to adjust (I do not want the link to be underlined or have any special effects such as when clicked, I just want the link to look the same size, font and black color as it is now):
----------------------------------------------------------------------------------------------------------
<h1 class="title--primary{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--fade-in{% endif %}">
{{ blog.title | escape }}
</h1>
----------------------------------------------------------------------------------------------------------
What css / html code changes are required to do this on the Shopify Dawn 10.0 theme at my website:
Thank you.
@bet - you can wrap it in a <a href=""></a> tag, but the issue is, if you add link around this text then all the posts in all the blogs will link to the very same blog, that is why to avoid that, replace above code with this and check
<h1 class="title--primary{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--fade-in{% endif %}">
{% if blog.url contains 'personal-finance' %}
<a href="https://www.buyexceltemplates.com/blogs/personal-finance">{{ blog.title | escape }}</a>
{% elsif %}
{{ blog.title | escape }}
{% endif %}
</h1>
Hi @suyash1 Thank you for your reply. I added the code but was not able to save the theme file. See error in attached image. Are you able to adjust your code?
@bet - try by changing the single quote to double quotes on line 25
Hi @suyash1 thanks for trying to find a solution but got same issue. I really like the idea that this would be able to work with multiple blogs.
@suyash1 @ I figured out the issue after searching online for if / then type code. The one I found used if else, so I tried that and the code worked great. Thanks again.
User | RANK |
---|---|
208 | |
177 | |
63 | |
51 | |
47 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023