How to remove the back to blog on dawn theme?

How to remove the back to blog on dawn theme?

ronnie11
Visitor
3 0 0

Hey ive got an online store and a blog but i want to remove the "back to blog" from the blog, because i only have one blog post so its very unnecessary and can get the customer lost. My domain is vesitekniikka.com, go to "Blogi" from the header and scroll down, its in finnish, i hope thats alright because its the same problem.

Also, i found an not so old conversation and there was a code but it didnt work. 

 

Thanks in advance.

Replies 5 (5)

zaczee
Globetrotter
855 46 42

Hi @ronnie11 ,

 

Add this CSS code
Online Store > Themes > Edit code > Assets > custom.css or theme.css

.article-template__back { display: none; }

 

ronnie11
Visitor
3 0 0

Hi, i dont find any "custom.css" or "theme.css" in assets. 

NomtechSolution
Astronaut
1245 113 153

To remove the "Back to Blog" link from your blog page in the Craft theme, you can follow these steps:

  1. From your Shopify admin, go to "Online Store" and click on "Themes".
  2. Locate your Craft theme and click on the "Actions" dropdown, then select "Edit code".
  3. In the left-hand sidebar, under "Sections", click on "blog-template.liquid" to open the file.
  4. Search for the code that generates the "Back to Blog" link. It may look something like this:

 

<a href="{{ blog.url }}" class="blog-template__back-link">{{ 'blog.back_to_blog' | t }}</a>
​

 

  • remove it
ronnie11
Visitor
3 0 0

Hi, im using Dawn theme not Craft theme

Univers-d-Ange
Excursionist
21 0 2

Hi, I found the solution for DAWN THEME 12

- Open the main-article.liquid file (in the edit code section)

- Near the line 88, you will see this code :

 <div class="article-template__back element-margin-top center{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
<a href="{{ blog.url }}" class="article-template__link link animate-arrow">
<span class="icon-wrap">{% render 'icon-arrow' %}</span>
{{ 'blogs.article.back_to_blog' | t: title: blog.title }}
</a>
</div> 

 

- delete it, or put %comment on these lines

 

- After, it should be like that :

 

{% comment %}
<div class="article-template__back element-margin-top center{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
<a href="{{ blog.url }}" class="article-template__link link animate-arrow">
<span class="icon-wrap">{% render 'icon-arrow' %}</span>
{{ 'blogs.article.back_to_blog' | t: title: blog.title }}
</a>
</div>
{% endcomment %}

 

And no more  "back to blog"

Univers d'Ange : La boutique des Anges
Découvrez nos bagues d'Ange ou nos pendentifs d'Ange