How to hide blog published date & I want to show the Modified date?

Highlighted
New Member
2 0 0

Hope you are well. I'm trying to find a way to remove the blog published date from every page in which it appears in the site. I've tried a few options suggested previously in the forum, but they seem to mess up the whole site for some reason. There are 3 main areas where they appear:

 

1) The home page where I've inserted a preview of the blog posts

2) Then again on the actual blog post page:

3) And then again on the main blog post page where a preview of all blog posts is located (note: I've changed the coding to show columns of 3...normally this is the page that shows all blog posts one under another).
All Blog Posts

Any help would be appreciated, let me know if you need me to clarify anything.


Thanks

 

Blog Post.pngHomePage.png

0 Likes
Highlighted

Hi @Biancaedwards :

 

You should look into the file where the blog posts are listed and search for article.published_at liquid variable and replace it with article.updated_at

 

Example:

  <p class="text-light">
            {% capture date %}<strong>
            
            
            <time pubdate datetime="{{ article.published_at | date: '%Y-%m-%dT%H:%M:%SZ' }}">{{ article.published_at | date: format: 'date' }}</time></strong>{% endcapture %}
           
            
            
            {% capture author %}<strong>{{ article.author }}</strong>{% endcapture %}
            {{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
          </p>

Should be replaced with

 

  <p class="text-light">
            {% capture date %}<strong>
            
            
            <time pubdate datetime="{{ article.updated_at| date: '%Y-%m-%dT%H:%M:%SZ' }}">{{ article.updated_at| date: format: 'date' }}</time></strong>{% endcapture %}
           
            
            
            {% capture author %}<strong>{{ article.author }}</strong>{% endcapture %}
            {{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
          </p>

 

Thanks,

---

 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution

Ricardo | Founder @ VN Studios
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
0 Likes