Shopify how to display the last 5 articles on blog page with images only

Shopify how to display the last 5 articles on blog page with images only

35
6



* Shopify app: Rectify – Edit products in cart | Only 50$ ( one time fee no monthly charge!) *
=== https://apps.shopify.com/rectify-edit-products-in-cart ===

Question of the day by Saso: How can I display the last 5 articles on my blog page with images only?

** NEW TO SHOPIFY ? ** We were able to negotiate special rebates with Shopify on top of special offers we have for you on each Shopify plan. 10% OFF and up to 4 349$ worth of rebate and free bonus: https://www.insightshop.co/pages/shopify-plan-discounts-rebate-special-price

** WANT TO LEARN CSS FOR SHOPIFY ? ** Take a look here for my FREE class that I will release soon: https://app.convertkit.com/landing_pages/55593

If you have any questions please ask below in comments or send me an email at: info@webso.ca

————————–

Here is the cheat sheet I use: http://cheat.markdunkley.com/

Here is some code that I used in the video (don’t forget the curly brackets):
– To limit the wording to a certain number of words use “| truncatewords: 35”
– To remove the content completely remove “article.content” or “article.excerpt_or_content”
– To show only what is in the excerpt of the article use “article.excerpt”
– To limit the number of articles on the blog page add “limit: 5” in the “for” loop element

————————

Thank you,
I am a Shopify Expert!

Linked In: https://ca.linkedin.com/in/robertbugeag
Instagram: https://instagram.com/rbugeag/
Twitter: https://twitter.com/RBugeag
Skype: robert.bugeag

6 Comments

  1. how can I hide RSS from the blog?

  2. Very useful, thanks! I got a related question : In which liquid should I go to display my articles in the same way but on my front page ? My shopify template is showing the whole article and I don't really like that. Thanks 😀

  3. how do you hide the the link to the current blog post from the sidebar?

  4. +Donna Talarico Thank you for the comment and the question. In order to hide the ad on the blog you will need to add a line of code to your stylesheet.css to target it only on the blog pages. Go in admin > online store > themes > click 3 dots and edit html/css beside your theme > assets > stylesheet.css (or stylesheet.css.liquid) go to the bottom of the page and add this code:

    #blog #full-width-ad {
        display: none;
    }

    Let me know if it works for you. Thank you and best of luck.

  5. Hi! Is there a way to hide the full-width ad on the blog? While I'm OK with the store's header, the ad is a little too much on the blog. (http://www.thedreamdrawer.com is my store and I am using the flex theme, in case that helps you answer.)

  6. Very helpful. Thank you! You're a good teacher.

Leave a Reply

Your email address will not be published. Required fields are marked *