Timea1
April 3, 2022, 1:06pm
1
Good day,
I would like to ask help regarding the blog page layout on my store, https://palmswithlove.com/blogs/blog . I managed to add a code so now the layout is grid, however I would like to hide the text below the images and show only the featured image with the title of the post. Also, on one page, only 5 posts are showing. Is it possible to instead show much more?
Thank you in advance!
@Timea1
yes, please add this code
Go to Online Store->Theme->Edit code
Asset->/timber.scss.liquid ->paste below code at the bottom of the file.
.blog-body .article .rte.rte--indented-images {
display: none;
}
Timea1
April 4, 2022, 9:02am
3
It worked, thank you very much! May I ask if you know how could I display more than 5 articles on one page?
@Timea1
its my pleasure to help us yes, please share blog listing page code so i will check and update
Timea1
April 4, 2022, 1:32pm
5
This is the blog.liquid:
{% paginate blog.articles by 5 %}
{% if current_tags %}
{{ blog.title | link_to: blog.url }} — {{ current_tags.first }}
{% else %}
{{ blog.title }}
{% endif %}
RSS
{% for article in blog.articles %}
{% assign article_content = article.excerpt_or_content %}
{% unless article.image == blank %}
{% endunless %}
{{ article.published_at | date: format: 'date' }}
{% endfor %}
{% if paginate.pages > 1 %}
{% include 'pagination' %}
{% endif %}
{% endpaginate %}
.blog-body {
display: grid;
grid-template-columns: repeat(3,1fr);
grid-gap: 30px;
}
.blog-body .article {
margin: 0;
display: flex;
flex-direction: column;
}
.blog-body .grid__item {
padding: 0;
width: 100%;
left: 0;
}
@media(max-width: 767px){
.blog-body {
grid-template-columns: 1fr;
}
}
@Timea1
thanks but i can see its already per page doesn’t any change required now all good
Timea1
April 6, 2022, 8:44am
7
Thank you Kumar. The only problem is that as of now, there are only 5 articles per page. Is it possible to change it to 6 or maybe even more, like 12-15?
@Timea1
yes you can easy to chnge this {% paginate blog.articles by 5 %} to {% paginate blog.articles by 6 %}
change value as you like
Timea1
April 7, 2022, 9:15am
9
Thank you so much Kumar!!
@Timea1
its my pleasure to help us