All things Shopify and commerce
I have a page that has several sections and I would like to add 2 or more sections of the type "Blog Posts" within the same page but in separate locations.
How can I prevent blog posts shown in section 1 from showing in section 2 and so on?
I don't want to use different Blogs for each section but I would like all blog posts to come from the same blog and I would also like to avoid using TAGs as a method if possible
Thanks to anyone who can give me some advice
The default section allows you to select a category of blog posts. So just create a category like news, entertainment, etc and assign them to your blog posts.
From the customizer blog posts section you can then choose to show a specific category of posts like in the above news, sports, etc
HI @APDEV
Please add it and share the link with us, along with your specific plans for the changes. Let us know which parts should be hidden and which should be visible, and include detailed notes. Thanks a bunch! 😊
Best,
Daisy
Hi Daisy and thank you so much for contributing to my question.
Unfortunately I'm currently in a development store and can't share any links.
I understood that I can use categories/tags etc to map the posts that should be shown in one block of a section rather than in another of another section but my question was to understand if there is a practical way to never show in the same page, two identical contents in two different blocks, regardless of the relevant categories and tags.
In other systems you could obviously use a variable shared between all sections but in Shopify it would seem that this concept does not exist especially between different sections of the template.
You could go through the local storage of the client browser but it seems like an impractical method to me.
Pratical example:
Let's say I have a single blog with many articles:
article 1, 2 and 3 have a TAG called "TAG1", articles 2, 3 and 4 have a tag called "TAG2": as you can see article 2 and article 3 both have at the same time the tag "TAG1" and the tag "TAG2".
If I have two sections on my page and in the first section (immediately under the header) I show the first 3 articles that have the TAG "TAG1", in another section (immediately before the footer) I show the first 3 articles that have the TAG "TAG2".
In this case I will have items 1 and 2 shown at the same time in both section 1 and section 2.
The goal was to understand whether the articles shown in the sections can be saved into a variable so that they can be progressively excluded in subsequent sections
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024